diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-26 10:37:18 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-26 10:37:18 -0500 |
| commit | ad3e2a5da07fbfe02e0152eb3fc408a7bcf36e3c (patch) | |
| tree | a15ea8b33d5de33d545f9010eebb6d99be619c75 /test/compile_errors.zig | |
| parent | f7670882aff5fb3a943057edd9da34d053b5fe59 (diff) | |
| download | zig-ad3e2a5da07fbfe02e0152eb3fc408a7bcf36e3c.tar.gz zig-ad3e2a5da07fbfe02e0152eb3fc408a7bcf36e3c.zip | |
fix compiler crash on function with invalid return type
closes #722
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index cc28f29f26..64ee69ba18 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,6 +1,10 @@ const tests = @import("tests.zig"); pub fn addCases(cases: &tests.CompileErrorContext) void { + cases.add("function with invalid return type", + \\export fn foo() boid {} + , ".tmp_source.zig:1:17: error: use of undeclared identifier 'boid'"); + cases.add("function with non-extern enum parameter", \\const Foo = enum { A, B, C }; \\export fn entry(foo: Foo) void { } |
