Repository navigation
fix: prefer cursor fields over same-named local reads - #24
Merged
RandomChirp merged 1 commit intoOct 11, 2026
Merged
Conversation
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.
Fix field precedence over same-named local variables
A bare expression that shares its name with a LOCAL currently compiles to
LoadLocal, bypassing the active cursor field. For example, LOCAL m.item_id then
m.item_id = item_id reads the default .F. instead of a numeric field, so a later
INSERT fails with error 9.
Emit LoadName for bare expression reads and check the selected cursor field
before the current function's local slot. Preserve explicit m.name reads,
assignment targets, internal temporaries and private/public fallback. Rebuild
compiled bundles to get the corrected instructions; bytecode layout is unchanged.
Validation: synthetic reproduction fails before the change. Six focused cases,
680 full VM tests including doctests, and 16 WASM bridge/sample tests pass.
WASM, typecheck, lint and application build pass on macOS ARM64. Native Windows
VFP was not run. Fixtures are synthetic; developed with AI assistance.