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
t27b: untyped var from an integer literal, and an unread untyped undefined const (StmtLocal) #6995
Refs #6063 (t27b coverage lane 2, family StmtLocal).
t27b refuses two local shapes that the reference (t27c's Zig backend) compiles and runs:
A var set from a bare integer literal with no type, e.g. var i = 0;. t27b refuses it with "var i initialised with an untyped integer needs a type". The reference prints var i: u32 = 0;: a literal that fits u32 is typed u32, a larger one u64, and hex/binary literals are typed by value (zig_int_literal_default_type in bootstrap/src/compiler.rs). A negative or a float literal is not typed, and Zig refuses it.
An untyped const c = undefined; that nothing reads. t27b refuses it with "c has neither type nor value". The reference prints const c = undefined; _ = c; // dead after const-inlining, which does nothing. If the const is read, Zig refuses it, so t27b keeps refusing that case.
Files where StmtLocal is the only blocker on lab run 6600bd3:
specs/port/trinity/src/brain/orbitofrontal_value.t27 (var i = 0; in sqrt)
Plan: write the conformance spec specs/tri/t27b/conformance/untyped_local.t27 first (the reference passes 6/6, 0 vacuous), then make t27b match it in cli/t27b/src/lower.rs. The Rust edit is under the owner-approved-foreign approval on #6063.
Activity
gHashTag commentedon Oct 6, 2026
Done on master by #6998 (same family, other lane). PR #7010 closed as duplicate.