-
Notifications
You must be signed in to change notification settings - Fork 421
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
Merged
Merged
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
2 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
2 times, most recently
from
September 19, 2024 17:49
e402fb4
to
377ec06
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 24, 2024 15:59
377ec06
to
775be43
Compare
riftEmber
added a commit
to riftEmber/chapel
that referenced
this pull request
Sep 24, 2024
Fixed in chapel-lang#25954 Signed-off-by: Anna Rift <[email protected]>
1 task
riftEmber
added a commit
to riftEmber/chapel
that referenced
this pull request
Sep 24, 2024
Fixed in chapel-lang#25954 Signed-off-by: Anna Rift <[email protected]>
riftEmber
added a commit
that referenced
this pull request
Sep 24, 2024
Retire the future `test/chplcheck/UnusedFormalBug.chpl` which now passes. The underlying bug was fixed in #25954. [trivial, not reviewed] Testing: - [x] `test/chplcheck` tests
jabraham17
added a commit
that referenced
this pull request
Sep 25, 2024
Enables the UnusedFormal linter rule by default, which was turned off due to confusing bugs. @riftEmber resolved the known bugs with this rule in #25954, so this rule can be reenabled by default. [Reviewed by @riftEmber]
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: