This commit is contained in:
gingerBill
2025-01-31 09:34:38 +00:00
parent 2af60b8767
commit 05a2d1bfbf
+3 -1
View File
@@ -10375,7 +10375,7 @@ gb_internal ExprKind check_type_assertion(CheckerContext *c, Operand *o, Ast *no
add_type_info_type(c, o->type); add_type_info_type(c, o->type);
o->type = type_hint; o->type = type_hint;
o->mode = Addressing_OptionalOk; o->mode = Addressing_OptionalOk;
return kind; goto end;
} }
} }
@@ -10440,6 +10440,8 @@ gb_internal ExprKind check_type_assertion(CheckerContext *c, Operand *o, Ast *no
} }
} }
end:;
if ((c->state_flags & StateFlag_no_type_assert) == 0) { if ((c->state_flags & StateFlag_no_type_assert) == 0) {
add_package_dependency(c, "runtime", "type_assertion_check"); add_package_dependency(c, "runtime", "type_assertion_check");
add_package_dependency(c, "runtime", "type_assertion_check2"); add_package_dependency(c, "runtime", "type_assertion_check2");