Catch calls of a deferred out proc in short circuits during check

This commit is contained in:
Louis Novy committed 2026-09-29 19:22:01 -04:00
1 parent 0b3f7a5509
commit db46204e38
5 files changed
+60

No files matched your search

+3
View File
@@ -1315,6 +1315,9 @@ gb_internal void check_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags
} else {
check_expr_with_type_hint(ctx, &y, expr, x.type);
}
if (expr->viral_state_flags & ViralStateFlag_ContainsDeferredProcedure) {
error(expr, "Procedure calls that have an associated deferred procedure are not allowed within case clauses");
}
if (x.mode == Addressing_Invalid ||
y.mode == Addressing_Invalid) {