mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-08 23:04:24 +00:00
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
11 lines
241 B
Zig
11 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;
|
|
}
|