-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Heal member-select on opaque reference #19730
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
dwijnand
force-pushed
the
select-opaque
branch
from
February 19, 2024 11:03
c89a399
to
0a67c39
Compare
sjrd
requested changes
Feb 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only real comment is to consider putting all the branches in separate def
s. The rest is mostly rambling as I tried to understand the thing.
dwijnand
force-pushed
the
select-opaque
branch
2 times, most recently
from
March 4, 2024 13:11
f9025c9
to
6847de0
Compare
sjrd
approved these changes
Apr 2, 2024
dwijnand
force-pushed
the
select-opaque
branch
2 times, most recently
from
June 11, 2024 13:49
a9f23c1
to
5a4d891
Compare
Prior to the next commit, I broke up the logic into internal methods, so some can be reused, consuming then in a big Tree#orElse chain. I also took the opportunity to rename the method, to more easily distinguish it from the other typedSelect.
When the prefix of an opaque isn't the .this reference of the module class, then its RHS isn't visible. TypeComparer uses ctx.owner to "heal" or "lift" this type such that it is. We reuse that logic for member selection.
WojciechMazur
added a commit
that referenced
this pull request
Jul 9, 2024
Backports #19730 to the LTS branch. PR submitted by the release tooling. [skip ci]
This was referenced Aug 7, 2024
WojciechMazur
added a commit
that referenced
this pull request
Aug 8, 2024
This reverts commit 4443395. This reverts the behaviour changing part of #19730, which could make code that previously compiled, continue to compile but with a different runtime behaviour. Now, the code in question is very niche and esoteric, and effectively exploiting this opaque typing bug. So, we're happy to change the compiler to make this behaviour silently change, just not in a patch release.
WojciechMazur
added a commit
that referenced
this pull request
Aug 8, 2024
This reverts commit 4443395. This reverts the behaviour changing part of #19730, which could make code that previously compiled, continue to compile but with a different runtime behaviour. Now, the code in question is very niche and esoteric, and effectively exploiting this opaque typing bug. So, we're happy to change the compiler to make this behaviour silently change, just not in a patch release. (Same as #21340, but for the LTS.)
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.
When the prefix of an opaque isn't the .this reference of the module
class, then its RHS isn't visible. TypeComparer uses ctx.owner to
"heal" or "lift" this type such that it is. We reuse that logic for
member selection.
Fixes #19609