mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Fix error handling for type switch statement
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user