mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 07:17:48 -04:00
Catch calls of a deferred out proc in short circuits during check
This commit is contained in:
1 parent
0b3f7a5509
commit
db46204e38
5 files changed
+60
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user