Added array type

This commit is contained in:
2025-02-09 20:25:37 +01:00
parent c69f1aab5c
commit 7634244c56
13 changed files with 71 additions and 22 deletions

View File

@ -17,5 +17,17 @@ func Is(a Type, b Type) bool {
return true
}
aArray, aIsArray := a.(*Array)
if aIsArray && bIsPointer && (bPointer.To == nil || aArray.Of == bPointer.To) {
return true
}
bArray, bIsArray := b.(*Array)
if aIsArray && bIsArray && aArray.Of == bArray.Of {
return true
}
return false
}