zig/test/standalone/issue_339/test.zig
Jimmi Holst Christensen 8139c5a516
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00

12 lines
241 B
Zig

const StackTrace = @import("builtin").StackTrace;
pub fn panic(msg: []const u8, stack_trace: ?*StackTrace) noreturn {
@breakpoint();
while (true) {}
}
fn bar() anyerror!void {}
export fn foo() void {
bar() catch unreachable;
}