Fixed StackTrace not being resolved when panic is invalid (#1615)

This commit is contained in:
Jimmi Holst Christensen
2018-10-01 20:30:34 +02:00
committed by GitHub
parent d4d22df1d9
commit bc3e99c5e5
2 changed files with 13 additions and 1 deletions

View File

@@ -1,6 +1,16 @@
const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
"Panic declared with wrong type signature in tests",
\\test "" {}
\\
\\pub fn panic() void {}
\\
,
".tmp_source.zig:3:5: error: expected 'fn([]const u8, ?*builtin.StackTrace) noreturn', found 'fn() void'",
);
cases.add(
"compile error when evaluating return type of inferred error set",
\\const Car = struct {