Support ([N]T)([N]U{...})

This commit is contained in:
gingerBill
2026-04-23 10:42:53 +01:00
parent 01734dfa9b
commit a44b8b0af0
2 changed files with 121 additions and 2 deletions

View File

@@ -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);
}
}