Files
zig/test/cases/compile_errors/switch_expression-non_exhaustive_inline.zig
Justus Klausecker 0ecbd5a0e1 address comments
2025-08-07 13:58:49 +02:00

26 lines
348 B
Zig

const E = enum(u8) {
a,
b,
_,
};
export fn f(e: E) void {
switch (e) {
.a => {},
inline _ => {},
}
}
export fn g(e: E) void {
switch (e) {
.a => {},
else => {},
inline _ => {},
}
}
// error
//
// :10:16: error: cannot inline '_' prong
// :18:16: error: cannot inline '_' prong