t27b: drop top-level statements as the reference does (StmtExpr) #6363
Copy link
Copy link
Closed
Description
Refs #6063
t27b corpus specs --blockers --reference <t27c> at master bd59d8c ranks StmtExpr first in the greedy order: +5 reference-passing files, 10 reference-passing files need it.
All 10 are a statement at top level, outside any fn or test:
- a dotted
module a.b;/use a.b;that the t27c parser reads asaplus a stray.b(or.b.c) expression (fix(t27c): read a dotted module name and use path whole #6102):specs/sandbox/{health,https_enforce,modules,orphan_detection}.t27,specs/lsp/language.t27,specs/benchmarks/ternary_vs_binary.t27,specs/port/trinity/src/tri/gen_{arithmetic,image,work_stealing}.t27; - the tail of a test body the parser closed early (
specs/automation/wrapup-auto.t27, line 46).
t27c's Zig backend (gen_decl in bootstrap/src/compiler.rs) emits nothing for any top-level statement, so the reference compiles these files without it. t27b refuses them.
This issue: drop a top-level StmtExpr the way the reference does, and leave it out of the roots of the analyzed-fn set (the reference never emits it, so a fn only it names is never analyzed). Top-level StmtAssign is a separate family and stays refused.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity