Repository navigation
fix(zig): distinguish primitive value bindings from builtin types - #6042
Merged
dmitrii-f-t27 merged 4 commits intoOct 4, 2026
Merged
Conversation
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zig rejected source-defined values named
f16ori0because W730 left every primitive name bare. Distinguish declared value bindings/references from builtin type expressions: quote locals, tuple bindings, parameters and their mutable rebindings/discards, and first-assignment test/bench bindings. Track values after initialization and restore the outer set when a structured block ends; reset it for each item. Builtin aliases and integer/float casts keep their types. The broader keyword/dotted-name census in #2631 remains open.A source fixture and six native Zig tests cover independent results over 256 values plus UINT32_MAX, builtin aliases/casts, fresh item/nested block scopes, and two source mutants that compile then abort an executed test command with a real assertion panic. Full local validation: M1 release, M3 2,834 passed/0 failed/2 ignored across 124 targets, and M4 clean expected-failure ratchet (95 observed, cap126; whole corpus remains blocked/failed). All107 tri-net Zig modules execute 1,209 tests, including all19 SHA256 tests. Native generation preserves all102 Rust,75 C and113 Verilog outputs byte-for-byte; tri-net's compiler PIN and budgets are unchanged.
Native seal audit covers all804 existing source paths. Refresh only13 Zig aliases across7 specs without force; all other hashes and coverage1449/1325/124/debt remain unchanged. Reports stay honest:6 BLOCKED and1 PASS. The separate upstream SHA256 spec still has pointer errors; an accepted-baseline source-only value rename reproduces all three. Existing optimizer temporal-alias behavior remains outside this change. No hand-edited generated output or new warning allowances.
Bootstrap test-ratchet now installs actual Zig0.16 before the unchanged native tests. The original019e Linux job failed only because zig was absent (all six controls failed to spawn it). Native history preserves the original install delta264->265/243->244. Merge alignment retains upstream c107 loop-tools changes; final census is268 run steps/247 runner-selected shell steps (master267/246 plus the Zig install). Fetches/quiet match upstream; test/debt baselines are unchanged. Exact474673 Linux executes all six new Zig controls successfully; its three existing corpus column tests refuse missing Icarus. Install the actual Icarus prerequisite as well; final census269 run steps/248 runner-selected shell steps. New exact5dc Linux full acceptance is pending. Existing Icarus lowerability cargo counts include missing-witness skips and are not presented as executed simulations.
Closes #6040
Refs #1936, #2631