Repository navigation
gen-zig: a local declared []T from an array literal lowers to @constCast(&[_]T{...}) (Closes #8602) - #8617
Merged
Conversation
(&[_]T{...}) (Closes #8602) A slice-typed local initialized with an array literal lowered to .{...}, which Zig refuses (type '[]T' does not support array initialization syntax). Slice fields (W609) and returns (W607) already get @constcast(&[_]T{...}); locals now do. Measured over every tracked .t27: 28 specs change, each only at such locals; none passed before, 2 move past this error (compiler/mod_structure, vsa/ops). Their seals are refreshed (48 blocked -> blocked, 8 none -> blocked). Paid for by deleting scripts/gen_w378.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
9 tasks
5 tasks
dmitrii-f-t27
added a commit
to dmitrii-f-t27/t27
that referenced
this pull request
Oct 11, 2026
…s/gen_w389.t27 The merge with master lost the offset this PR had: master already deleted scripts/gen_w369.py (gHashTag#8856), so compiler.rs's +14 hand-written lines need another deletion. gen_w389.py (54 lines) is a one-off wave generator whose decision lives in specs/port/scripts/gen_w389.t27; only a dated docs/now note names it. Same precedent as gHashTag#8617 and gHashTag#8856. Refs gHashTag#5649, Refs gHashTag#5651
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.
Closes #8602
A local declared with a slice type and initialized from an array literal lowered to
.{...}, which Zig refuses:type '[]T' does not support array initialization syntax. Slice fields (W609) and slice returns (W607) already get@constCast(&[_]T{...}); this gives locals the same lowering.Measured over every tracked
.t27compiler/mod_structure,vsa/ops); the other 26 contain the pattern but stop first at another error. Nothing regresses.scripts/gen_w378.py.🤖 Generated with Claude Code