Skip to content

Fix scope problem - #124

Merged
Y-Nak merged 3 commits into
argotorg:mainfrom
Y-Nak:fix-scope-problem
Oct 23, 2026
Merged

Y-Nak merged 3 commits into
argotorg:mainfrom
Y-Nak:fix-scope-problem

Conversation

@Y-Nak

@Y-Nak Y-Nak commented Oct 23, 2026

Copy link
Copy Markdown
Member

resolve #123

Y-Nak added 3 commits October 23, 2026 11:05
Represent branch, loop body, post-clause, and initializer scopes with explicit HIR blocks so every compiler stage applies the same lexical boundaries. Restore specialization local types across blocks and match arms, and migrate name resolution, closure, editor, and backend regression coverage to these rules.
Stop exporting assembly let bindings into the surrounding Sail type environment. Preserve outer Sail types across assembly shadowing and diagnose references to Yul locals from later assembly blocks.
Expect outer bindings to survive branch-local declarations, and cover both branch outcomes for each captured input. Declare the loop-shared closure local before the loop and assign to it inside, instead of reading a body-local binding after its scope ends.

Validation: all 169 Sonatina and 168 Yul E2E tests pass with the CI e2e profile; both fixtures also pass the frontend driver.
@Y-Nak
Y-Nak merged commit b3c84fd into argotorg:main Oct 23, 2026
12 checks passed
@Y-Nak
Y-Nak deleted the fix-scope-problem branch October 23, 2026 04:42
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.

Nested declarations overwrite outer bindings

1 participant