mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 22:32:13 -04:00
Support ([N]T)([N]U{...})
This commit is contained in:
1 parent
01734dfa9b
commit
a44b8b0af0
2 files changed
+121
-2
No files matched your search
+7
-2
@@ -3460,8 +3460,13 @@ gb_internal bool check_is_castable_to(CheckerContext *c, Operand *operand, Type
|
||||
|
||||
|
||||
if (dst->kind == Type_Array && src->kind == Type_Array) {
|
||||
if (are_types_identical(dst->Array.elem, src->Array.elem)) {
|
||||
return dst->Array.count == src->Array.count;
|
||||
if (dst->Array.count == src->Array.count) {
|
||||
if (are_types_identical(dst->Array.elem, src->Array.elem)) {
|
||||
return true;
|
||||
}
|
||||
Operand op = *operand;
|
||||
op.type = src->Array.elem;
|
||||
return check_is_castable_to(c, &op, dst->Array.elem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user