Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
doc
langref
test_noreturn.zig
pretty
plain
permalink
blame
history
•
10 lines
•
179 B
1
fn foo(condition: bool, b: u32) void {
2
const a = if (condition) b else return;
3
_ = a;
4
@panic("do something with a");
5
}
6
test "noreturn" {
7
foo(false, 1);
8
}
9
10
// test