Fix summonInline deferred inline selection#26002
Open
DmytroMitin wants to merge 2 commits into
Open
Conversation
Author
|
I signed the CLA |
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.
Fixes #23134
When
summonInline[A]is used as the qualifier of an inline memberselection, the selection can initially be typed against the requested
abstract type
A. AftersummonInlineexpands to the actual implicitevidence, the qualifier may have a more precise singleton/refined type,
but the select can still keep the stale deferred inline symbol from
A.This caused inlining to fail with:
This patch repairs that stale select during inline retyping, but only
when the reselected member is uniquely proven to be the concrete
implementation of the originally selected deferred inline member.
The guard uses existing override machinery and filters alternatives
instead of relying on name-only lookup.
Regression coverage includes:
Intresults.How much have you relied on LLM-based tools in this contribution?
Moderately, for investigation support, adversarial review, and iterative refinement of the localized compiler fix and regression tests. The implementation, validation, and final review of the patch were performed manually.
How was the solution tested?
New automated tests (including the issue's reproducer)
Validated with:
I also attempted:
but it failed in apparently unrelated staging/repl/JDK/Scala.js test tasks before giving useful signal for this patch.