diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-06-27 18:32:59 +0300 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-30 09:57:38 +0200 |
| commit | 3204d00a5e7fe119b690e921138a439fb84dff5b (patch) | |
| tree | 40dba7f0816a1a8cae35657aa0d6bcb0ec19b6ba /test/cases/compile_errors/unreachable_code-double_break.zig | |
| parent | c248af3bdcd17c334e742d53a7ac7bda2422a688 (diff) | |
| download | zig-3204d00a5e7fe119b690e921138a439fb84dff5b.tar.gz zig-3204d00a5e7fe119b690e921138a439fb84dff5b.zip | |
move passing stage1 compile error tests to stage2
Diffstat (limited to 'test/cases/compile_errors/unreachable_code-double_break.zig')
| -rw-r--r-- | test/cases/compile_errors/unreachable_code-double_break.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/cases/compile_errors/unreachable_code-double_break.zig b/test/cases/compile_errors/unreachable_code-double_break.zig new file mode 100644 index 0000000000..f8e4b86a90 --- /dev/null +++ b/test/cases/compile_errors/unreachable_code-double_break.zig @@ -0,0 +1,13 @@ +export fn a() void { + const b = blk: { + break :blk break :blk @as(u32, 1); + }; + _ = b; +} + +// error +// backend=stage2 +// target=native +// +// :3:9: error: unreachable code +// :3:20: note: control flow is diverted here |
