Skip to content

fix(gen-zig): for-range emits its start expression, not the loop variable - #1943

Merged
gHashTag merged 1 commit into
masterfrom
fix/zig-for-range-start
Aug 8, 2026
Merged

fix(gen-zig): for-range emits its start expression, not the loop variable#1943
gHashTag merged 1 commit into
masterfrom
fix/zig-for-range-start

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Closes #1942

for i in 0..10 emitted for (i..10) |i| — gen_for_range_stmt wrote the loop VARIABLE where the range start belongs. Emits children[0] now. Surfaced by the tri-net testbench transcription (first real for-range uses in the zig corpus). Only unit red is pre-existing bitnet_layer. FROZEN_HASH resealed; NOW.md entries added.

🤖 Generated with Claude Code

…able

Closes #1942

gen_for_range_stmt wrote node.name (the loop variable) where the range
START expression belongs: `for i in 0..10` emitted `for (i..10) |i|`,
an undeclared identifier for any range not starting at the variable's
own name. Emits children[0] now (and the loop variable goes through
zig_ident). Surfaced by transcribing tri-net testbench blocks into
executable tests -- the first real for-range uses in the zig corpus.

Only unit red is the pre-existing bitnet_layer iverilog test.
FROZEN_HASH resealed; NOW.md entries added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 14:18
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 14:19:10 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 1
PRs with All Checks Green 13
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d61af1df5f2b != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 3e7b881 into master Aug 8, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gen-zig: for-range emits the loop VARIABLE as the range start (for (i..10) |i|)

1 participant