diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-20 22:44:35 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-20 22:44:35 +0000 |
| commit | 65cb38213520c2310bccfc198cfcf8e8eb6f455a (patch) | |
| tree | b941cf7ec92df32a9411ce394415a78f3b101f38 /src | |
| parent | f39b34a8b7ce026d608532451f4f2aada40f5102 (diff) | |
Fix error handling for type switch statement
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_stmt.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 7cccab226..17502a6e2 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1365,6 +1365,8 @@ gb_internal void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_ } if (unhandled.count > 0) { + ERROR_BLOCK(); + if (unhandled.count == 1) { gbString s = type_to_string(unhandled[0]); error_no_newline(node, "Unhandled switch case: %s", s); |