You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core_selfhost genc/switch_exhaustive.t27: build the _ => arm again, now that gen-c lowers _ as the catch-all (#7456) #7879
bootstrap/tests/fixtures/core_selfhost/genc/switch_exhaustive.t27 came in with #7331 (#7308). It is a gen-c repro: the core_selfhost harness builds its gen-c output with cc and runs the spec's own tests. #7331 dropped the fixture's _ => arm, the rest() fn and its two asserts, in 43dbe54. The reason was that gen-c then lowered a _ arm to (x == _), which C cannot compile.
#7456 (Closes #7428) fixed that on master: a _ switch arm is now the catch-all. So the fixture can build the arm again, and the _ catch-all gets a runnable check, not only "gen-c accepts it".
Done when
The fixture has fn rest(x: i64) -> i64 { return switch (x) { 1 => 10, _ => 7, }; } again, with assert(rest(1) == 10) and assert(rest(5) == 7), and the header says _ counts.
cargo test --release -p t27c --test core_selfhost passes on the Railway t27c lab.
Checked already on the t27c lab, on master ce605a6 merged with #7436: gen-c output for the restored fixture has no (x == _), and core_selfhost passes 1/1.
Activity