mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
address comments
This commit is contained in:
parent
ba549a7d67
commit
0ecbd5a0e1
@ -1117,8 +1117,6 @@ test "switch on non-exhaustive enum" {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var e: E = .a;
|
try E.doTheTest(.a);
|
||||||
_ = &e;
|
|
||||||
try E.doTheTest(e);
|
|
||||||
try comptime E.doTheTest(.a);
|
try comptime E.doTheTest(.a);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,6 @@ pub export fn entry2() void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// error
|
// error
|
||||||
// backend=stage2
|
|
||||||
// target=native
|
|
||||||
//
|
//
|
||||||
// :12:5: error: switch must handle all possibilities
|
// :12:5: error: switch must handle all possibilities
|
||||||
// :3:5: note: unhandled enumeration value: 'b'
|
// :3:5: note: unhandled enumeration value: 'b'
|
||||||
|
|||||||
@ -20,8 +20,6 @@ export fn g(e: E) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// error
|
// error
|
||||||
// backend=stage2
|
|
||||||
// target=native
|
|
||||||
//
|
//
|
||||||
// :10:16: error: cannot inline '_' prong
|
// :10:16: error: cannot inline '_' prong
|
||||||
// :18:16: error: cannot inline '_' prong
|
// :18:16: error: cannot inline '_' prong
|
||||||
|
|||||||
@ -12,7 +12,5 @@ export fn f(e: E) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// error
|
// error
|
||||||
// backend=stage2
|
|
||||||
// target=native
|
|
||||||
//
|
//
|
||||||
// :10:14: error: unreachable else prong; all explicit cases already handled
|
// :10:14: error: unreachable else prong; all explicit cases already handled
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user