mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-21 16:41:56 +03:00
translate-c: switch default should have an empty block not break
This commit is contained in:
+1
-1
@@ -2276,7 +2276,7 @@ fn transSwitch(
|
||||
}
|
||||
|
||||
if (!has_default) {
|
||||
const else_prong = try Tag.switch_else.create(c.arena, Tag.@"break".init());
|
||||
const else_prong = try Tag.switch_else.create(c.arena, Tag.empty_block.init());
|
||||
try cases.append(else_prong);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user