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
t27c lowers a Rust match block to nothing, and typecheck accepts it #5949
t27c gen-rust writes pub fn get_type(info: Info) -> AuthType {\n}, an empty body for a non-unit return.
t27c gen (Zig) writes // NOT LOWERED: empty statement -- statement rendered to nothing (T43).
t27c gen-c declares the function with no usable body.
t27c parse and t27c typecheck both accept the spec.
Cause
W914 (bootstrap/src/compiler.rs, the match arm of the body-statement parser) captures a match block verbatim into a StmtExpr named match: "read, counted as nothing, executed as nothing". The intent was to stop a hard parse error, but it also hides the block from every check. It applies to every match block, tail or not; a match whose arms assign or return loses those effects too.
t27 already has the construct: switch (x) { a => ..., else => ... } (ExprSwitch, lowered by every backend). Rust's match with payload patterns (Ok(v) =>, Some(r) =>) has no t27 equivalent.
Activity
docs(now): t27c refuses a Rust match block the parser kept as text (C…
Merge origin/master into claude/t27c-match-tail-expr; refreeze FROZEN…
seal: re-seal wp18 selftest with the merged compiler (Closes #5949)
fix(t27c): refuse a Rust match block the parser kept as text; rewrite…