-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resolving 'this' call on shadowing variable #25954
Open
riftEmber
wants to merge
11
commits into
chapel-lang:main
Choose a base branch
from
riftEmber:dyno-shadowed-this
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
riftEmber
force-pushed
the
dyno-shadowed-this
branch
2 times, most recently
from
September 17, 2024 19:37
b23a3c8
to
c39fd0f
Compare
10 tasks
riftEmber
force-pushed
the
dyno-shadowed-this
branch
5 times, most recently
from
September 18, 2024 19:58
a33b27b
to
9262dfd
Compare
mppf
approved these changes
Sep 18, 2024
riftEmber
force-pushed
the
dyno-shadowed-this
branch
from
September 19, 2024 16:25
9262dfd
to
5140b35
Compare
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
To avoid edge cases with module names Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
Signed-off-by: Anna Rift <[email protected]>
riftEmber
force-pushed
the
dyno-shadowed-this
branch
from
September 19, 2024 17:49
e402fb4
to
377ec06
Compare
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 a dyno bug preventing resolution of 'this' calls on a variable that shadows another.
The problem stemmed from looking up the identifier we call 'this' on as though it were a function. In function resolution, we look for all visible identifiers rather than just the innermost. However, for an implicit 'this' call on a var, we want to look up the (innermost) var, then call 'this' on it. Fixed by just resolving to the innermost result between an ambiguous set of variables.
Also adds testing for the fixed case, as well as that a similar case (correct ambiguity between methods in analogous scopes) isn't broken.
Resolves https://github.com/Cray/chapel-private/issues/6706.
Note to reviewer: Went though several iterations, so changes are probably easiest to review as a whole rather than by commit.
[reviewer info placeholder]
Testing: