diff options
| author | Jimmi HC <jhc@liab.dk> | 2018-06-29 10:21:43 +0200 |
|---|---|---|
| committer | Jimmi HC <jhc@liab.dk> | 2018-06-29 10:21:43 +0200 |
| commit | 4c3f27ce1ea17b5236a022971ebace73a02b7c2b (patch) | |
| tree | 9950a381f4803b3124e687bd897451d1a8304b31 /test/compile_errors.zig | |
| parent | b1128b18d5395d85f1c483d8b35e33c57be80722 (diff) | |
| download | zig-4c3f27ce1ea17b5236a022971ebace73a02b7c2b.tar.gz zig-4c3f27ce1ea17b5236a022971ebace73a02b7c2b.zip | |
ir_resolve_const now checks recursivly for undef values
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 2247f0af96..8749f5b560 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -4124,4 +4124,19 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , ".tmp_source.zig:3:36: error: @ArgType could not resolve the type of arg 0 because 'fn(var)var' is generic", ); + + cases.add( + "Trying to pass undefined array to function taking comptime array by value", + \\fn a(comptime b: [2]u8) u8 { return b[0]; } + \\ + \\test "" { + \\ const arr: [2]u8 = undefined; + \\ _ = a(arr); + \\} + , + ".tmp_source.zig:5:11: error: use of undefined value", + ); + + + } |
