diff options
| author | Andrea Orru <andrea@orru.io> | 2018-01-07 04:43:15 -0500 |
|---|---|---|
| committer | Andrea Orru <andrea@orru.io> | 2018-01-07 04:43:15 -0500 |
| commit | de1f57926f212f18a98884fa8b1d0df7f7bc7f03 (patch) | |
| tree | 779595179f9a556e04d8a159ae15f6e8b669d13d /test/compile_errors.zig | |
| parent | 31828572249883f99fad307dc6b27df9d1678a8d (diff) | |
| parent | 32ba0dcea953a044b509081b583b3eed3b27b577 (diff) | |
| download | zig-de1f57926f212f18a98884fa8b1d0df7f7bc7f03.tar.gz zig-de1f57926f212f18a98884fa8b1d0df7f7bc7f03.zip | |
Merge branch 'master' of github.com:zig-lang/zig
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 60e5c3614d..ec3ec78664 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,6 +1,18 @@ const tests = @import("tests.zig"); pub fn addCases(cases: &tests.CompileErrorContext) { + cases.add("bad identifier in function with struct defined inside function which references local const", + \\export fn entry() { + \\ const BlockKind = u32; + \\ + \\ const Block = struct { + \\ kind: BlockKind, + \\ }; + \\ + \\ bogus; + \\} + , ".tmp_source.zig:8:5: error: use of undeclared identifier 'bogus'"); + cases.add("labeled break not found", \\export fn entry() { \\ blah: while (true) { |
