Skip to content

typecheck: scope the W456 immutable-array-element error to const ROM arrays - #1926

Merged
gHashTag merged 1 commit into
masterfrom
fix/array-elem-mutability
Aug 8, 2026
Merged

typecheck: scope the W456 immutable-array-element error to const ROM arrays#1926
gHashTag merged 1 commit into
masterfrom
fix/array-elem-mutability

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

W456's intent is rejecting writes into module-level const arrays (ROM), but it keyed on is_mutable alone -- element assignment into a fn-LOCAL let-bound array (t27's inferred-mutability convention, same as scalars) raised a hard error, and the last two tri-net specs failing typecheck hit exactly this. SymbolEntry now carries is_const: const arrays keep the ROM error (existing W456 unit test preserved), local let-arrays get the scalar-style warning. tri-net's full-corpus typecheck sweep: 2 -> 0 failing -- clean for the first time, opening the door to a full-sweep typecheck gate in tri-net CI. Unit suite 1537/1537; FROZEN_HASH resealed; NOW files updated.

Closes #1925

🤖 Generated with Claude Code

…arrays

W456's intent is rejecting writes into module-level const arrays (ROM),
but it keyed on is_mutable alone, so element assignment into a fn-local
let-bound array -- where t27's convention is inferred mutability (scalar
reassignment is a mere warning; every backend promotes to var/mut) --
raised a hard error. SymbolEntry now carries is_const (module-level const
declarations only): const arrays keep the W456 error (existing unit test
preserved), local let-arrays get the scalar-style promotion warning.
tri-net's full-spec typecheck sweep goes 2 failing -> 0 -- the corpus is
typecheck-clean for the first time. Unit suite 1537/1537; FROZEN_HASH
resealed.

Closes #1925

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 08:50
@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 08:50:38 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)=e489784ba9eb != 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 7922936 into master Aug 8, 2026
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.

typecheck: W456 fires on fn-local let-arrays, not just const ROM

1 participant