Skip to content

[MiscDiagnostics] Fix a crash in OpaqueUnderlyingTypeChecker #42039

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
Mar 28, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Mar 25, 2022

Since opaque result type can reference generic parameters of context,
it cannot reply purely on "index" of the opaque generic parameter
while diagnosing a problem, it needs to perform a type substitution
using a substitution map of a particular candidate to determine the
underlying type.

Resolves: rdar://90456579

@xedin xedin requested a review from hborla March 25, 2022 23:46
@xedin xedin changed the title [MiscDiagnostics] Fix a crash OpaqueUnderlyingTypeChecker [MiscDiagnostics] Fix a crash in OpaqueUnderlyingTypeChecker Mar 25, 2022
Since opaque result type can reference generic parameters of context,
it cannot reply purely on "index" of the opaque generic parameter
while diagnosing a problem, it needs to perform a type substitution
using a substitution map of a particular candidate to determine the
underlying type.

Resolves: rdar://90456579
@xedin
Copy link
Contributor Author

xedin commented Mar 25, 2022

@swift-ci please test

@xedin xedin merged commit a620902 into swiftlang:main Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants