fix: fix init-reassign for-loop bug - #466
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mr-zwets
added a commit
that referenced
this pull request
Sep 29, 2026
- Use the default value for compiler options that are passed as undefined
(e.g. `{ enforceLocktimeGuard: config.x }` with `x` unset), which disabled
the locktime guard or parameter type checks, and only record the known
options in the artifact (unknown keys and the `files` map were copied in).
- Make the old stack slot of a variable anonymous when it is reassigned
outside of a loop or branch, so a mismatch between where the symbol table
records a final use and where code generation reads the variable (like
the ones fixed in #464 and #466) is a compile error instead of reading an
outdated value. This does not change any bytecode, and makes console.log
show the current value of a reassigned variable after its final use.
- Declare new tuple destructuring targets after visiting the right-hand side,
so using one of them there is an UndefinedReferenceError instead of an
internal error.
Adds a test that no variable is read after its final use, for every valid
contract file and for a contract that reads the same variable in every
child of each expression node type.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
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.
No description provided.