Skip to content

[5.5][Diagnostics] Avoid relying on solution for contextual purpose information #37066

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 2 commits into from
Apr 27, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Apr 26, 2021

  • Augment ContextualType element to carry its purpose
  • Switch to use contextual purpose associated with locator

Both of these changes mean that diagnostics no longer need to
query a solution for contextual "purpose" associated with a
particular location, which benefits ContextualFailure and all
of its subtypes.

Resolves: rdar://68795727

…pose

Having purpose attached to the contextual type element makes it much
easier to diagnose contextual mismatches without involving constraint
system state.

(cherry picked from commit 51ff12d)
@xedin xedin added the r5.5 label Apr 26, 2021
@xedin xedin requested a review from hborla April 26, 2021 19:23
@xedin
Copy link
Contributor Author

xedin commented Apr 26, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 06ea4506a4efdf939cd9c849e3eb2feee8d25123

`ContextualFailure` is the main beneficiary of additional information
associated with `ContextualType` element because it no longer has to
query solution for "purpose" of the contextual information.

Resolves: rdar://68795727
(cherry picked from commit 71372bc)
@xedin xedin force-pushed the rdar-68795727-5.5 branch from 06ea450 to 458fae7 Compare April 26, 2021 19:58
@xedin
Copy link
Contributor Author

xedin commented Apr 26, 2021

@swift-ci please test

@xedin xedin merged commit ee315ec into swiftlang:release/5.5 Apr 27, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 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.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants