master
1export fn foo() void {
2 const x = switch (bar()) {
3 1, 2 => 1,
4 3, 4 => 2,
5 else => 3,
6 };
7 _ = x;
8}
9fn bar() i32 {
10 return 2;
11}
12
13// error
14//
15// :2:15: error: value with comptime-only type 'comptime_int' depends on runtime control flow
16// :2:26: note: runtime control flow here