fix(compiler): M5 — module var arrays writable, qualified calls skip namesake check - #5615
Merged
Merged
Conversation
…he namesake check Two corpus-ratchet unexpected failures, one M5 freeze move (FROZEN.md 5): Closes #5573: a module-level `var` array parses to ConstDecl with extra_mutable set, but the typechecker registered every ConstDecl as is_mutable: false, is_const: true, so W456's ROM rule rejected every element write into a module var. The registration now reads extra_mutable; two tests pin the writable-var / ROM-const split. Closes #5574: use_resolve flattened a qualified call such as multi_head_attn::forward(...) to the bare name, binding it to the LOCAL forward of a different arity and reporting a false arity error. A qualified CALL whose local namesake disagrees with every imported declaration of that name (normalised text) now keeps its qualifier, so the call binds to no local function and the arity check is skipped by non-match; faithful inline copies (dataset.t27) still flatten, and non-call spellings keep the old flattening. The two suite_expectations entries for these specs are removed: both mha_block.t27 and disjoint_set.t27 now pass typecheck. Seal: frozen-digest -> b45a356c2eb651059e73d93e913558131b303d003e80f5d6642d3ddab7dd3526 (ceremony step 3); cargo build --release passes with the new seal; 1750 tests pass (cargo test --release -p t27c --bin t27c).
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
Contributor
PR DashboardGenerated at: 2026-10-02 17:44:30 UTC
Summary
Seal Status
|
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
…mul_serial_hw) (Refs #5573)
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
[GOLD-RING] — M5 freeze ceremony for
bootstrap/src/compiler.rs(FROZEN.md §5).Closes #5573
Closes #5574
Refs #5497
What
Two of the corpus-ratchet unexpected failures, both in the frozen compiler core:
vararray parsed toConstDeclwithextra_mutableset, but the typechecker registered everyConstDeclasis_mutable: false, is_const: true, so W456's ROM rule rejected every element write (disjoint_set.t27, and the same defect underspecs/fpga/bridge.t27). The registration now readsextra_mutable. Two tests pin the split: a modulevararray is writable, a moduleconstarray stays ROM.use_resolveflattenedmulti_head_attn::forward(...)to the bareforward, binding the call to the LOCALforwardof a different arity and reporting a false "expects 2 args, got 3" (mha_block.t27). A qualified CALL whose local namesake disagrees with every imported declaration of that name (normalised text) now keeps its qualifier, so the call binds to no local function and the arity check is skipped by non-match. Faithful inline copies (dataset.t27) still flatten; non-call spellings keep the old flattening.Four
suite_expectationsentries are removed —mha_block.t27,disjoint_set.t27(the two targeted), plusspecs/fpga/bridge.t27andspecs/port/fpga/vivado/matmul_serial_hw.t27, which the same fixes resolved and the ratchet flagged as unexpected passes.Ceremony
t27c frozen-digest→b45a356c2eb651059e73d93e913558131b303d003e80f5d6642d3ddab7dd3526 bootstrap/src/compiler.rs(stage0/FROZEN_HASH updated).cargo build --release -p t27cpasses with the new seal.cargo test --release -p t27c --bin t27c: 1750 passed, 0 failed, 2 ignored (pre-existing).t27c typecheck specs/ml/transformer/mha_block.t27→ OK (was 2 errors);specs/tri/graph/disjoint_set.t27→ OK (was 1 error);specs/igla/coder/dataset.t27→ OK (no regression).Boundaries