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