diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 15:58:27 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 19:20:19 -0700 |
| commit | 8b05205bb71fca55569a9ff4cab89ec9e09640ba (patch) | |
| tree | 1bcc329a4a2d79b35f6ab5b6e8e6fcf8bc986f72 /test/cases/compile_errors/for_unbounded.zig | |
| parent | e89bfedd8d68a731cb227327a325e16fc7812df9 (diff) | |
| download | zig-8b05205bb71fca55569a9ff4cab89ec9e09640ba.tar.gz zig-8b05205bb71fca55569a9ff4cab89ec9e09640ba.zip | |
implement error for unbounded for loops
Diffstat (limited to 'test/cases/compile_errors/for_unbounded.zig')
| -rw-r--r-- | test/cases/compile_errors/for_unbounded.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cases/compile_errors/for_unbounded.zig b/test/cases/compile_errors/for_unbounded.zig new file mode 100644 index 0000000000..5d05b1061f --- /dev/null +++ b/test/cases/compile_errors/for_unbounded.zig @@ -0,0 +1,11 @@ +export fn b() void { + for (0..) |i| { + _ = i; + } +} + +// error +// backend=stage2 +// target=native +// +// :2:5: error: unbounded for loop |
