Skip to content

[5.9][CSSyntaticElement] Desugar types before collecting "in scope" type v… #65049

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

Merged
merged 1 commit into from
Apr 11, 2023

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