Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Apr 10, 2023

…ariables

Cherry-pick of #65048


  • Explanation:

Generic type aliases, unless desugared, could bring unrelated type variables into the scope i.e. TypeAlias<$T, $U>.Context is actually _Context<$U>. These variables could be inferrable only after the the body the closure is solved. To avoid that, let's adjust TypeVariableRefFinder to desugar types before collecting referenced type variables.

Resolves: rdar://107835060
(cherry picked from commit ca14ab7)

…ariables

Generic type aliases, unless desugared, could bring unrelated type variables
into the scope i.e. `TypeAlias<$T, $U>.Context` is actually `_Context<$U>`.
These variables could be inferrable only after the the body the closure is
solved. To avoid that, let's adjust `TypeVariableRefFinder` to desugar types
before collecting referenced type variables.

Resolves: rdar://107835060
(cherry picked from commit ca14ab7)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Apr 10, 2023
@xedin xedin requested a review from hborla April 10, 2023 22:45
@xedin xedin requested a review from a team as a code owner April 10, 2023 22:45
@xedin
Copy link
Contributor Author

xedin commented Apr 10, 2023

@swift-ci please test

@xedin xedin merged commit c831d13 into swiftlang:release/5.9 Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 5.9

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants