Repository navigation
Backport "Also call avoidingType when using the custom unpackProxiesFromResultType during inlining" to 3.10.1 - #27283
Merged
Conversation
…ype during inlining (#26893) In #23792, when in `unpackProxiesFromResultType` I used inlined.expansion.tpe instead of Inlined.tpe, I didn't realize that when creating the inlined Inlined node and assigning type to it, avoidingType is also called: ```scala def assignType(tree: untpd.Inlined, bindings: List[Tree], expansion: Tree)(using Context): Inlined = tree.withType(avoidingType(expansion, bindings)) ``` Without this avoidingType here, the skolem type from the minimization does not get replaced early enough, and subsequent cavoidingType calls can't see it as by that point the skolem is replaced with a term ref, causing it to effectively leak. So as a fix, we read the avoiding type after unpacking the inlined node with inlined.epression.tpe. Fixes #26785 ## Have you relied on LLM-based tools in this contribution? <!-- Pick one; "running tests" is not enough; refer to https://github.com/scala/scala3/blob/main/LLM_POLICY.md for details --> Yes, and I manually checked the logic and output. ## How was the solution tested? <!-- Pick one; exceptions must have a very good reason --> New automated tests (including the issue's reproducer, if applicable) [Cherry-picked c202f34]
Base automatically changed from
release-3.10.1_backport-27129
to
release-3.10.1
October 11, 2026 11:24
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.
Backports #26893 to the 3.10.1-RC1.
PR submitted by the release tooling.
[skip ci]