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
[bug] t27b: a local of an undeclared type in an unreached fn passes, Zig refuses it (hole in the #10897 body rule) #11053
Keep the refusal of a local whose type annotation names a type declared nowhere, in a fn no test reaches. AstGen resolves every name in a body, reached or not; since #10999body_plan (specs/tri/t27b/lazy_sig_plan.t27) withdraws it as if it were a Sema-level refusal.
Why
Found by the TB2 lane of epic #10879 while building the constant rule (#10899): for
fn f() { var x : Missing = 0; }
with no test calling f, t27b now passes the spec and t27c test-report says BLOCKED ("use of undeclared identifier 'Missing'"). This is a false pass: t27b accepts a spec the reference refuses, and reference_disagree does not count it because the reference does not run it. The t27o corpus (1,130 of 1,216 pass) did not show it; the hole is in the rule, not in a measured spec.
Boundary
specs/tri/t27b/lazy_sig_plan.t27
gen/rust/tri/t27b/lazy_sig_plan.rs
cli/t27b/tests/tail.rs
specs/tri/t27b/conformance/lazy_signature.t27
User Scenarios
Given a spec with an unreached fn that declares a local of an undeclared type, whent27b test runs it, then t27b refuses it, as t27c test-report does.
Activity
t27b: a local of a type declared nowhere keeps its refusal in a fn no…
t27b: a local of a type declared nowhere keeps its refusal in a fn no…
t27b: a module constant nothing analyzed reaches is lazy like an unre…