Skip to content

[CSFix] Handle some cases where the same fix appears in multiple solutions #36045

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 3 commits into from
Feb 19, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 19, 2021

  • Same missing conformance in multiple different solutions;
  • Same invalid reference in a key path;
  • Same out-of-order argument;

Same in this context means located in the same position and having exactly the same information e.g. same requirement/non-conforming type, same argument positions, same member declaration etc.

Resolves: SR-14093
Resolves: rdar://73600328
Resolves: rdar://74447308

It's possible that different overload choices could have the same
conformance requirement, so diagnostics should be able to emit an
error in situations where multiple solutions point to the missing
conformance at the same location (both in AST and requirement list).

Resolves: rdar://74447308
… solutions

If multiple solutions have exactly a fix for exactly the same invalid member
reference in key path, let's diagnose that as if there is no ambiguity there.
…cases

Is the same argument is out-of-order in multiple solutions, let's
diagnose it as if there was no ambiguity.

Resolves: SR-14093
Resolves: rdar://73600328
@xedin xedin requested a review from hborla February 19, 2021 02:02
@xedin
Copy link
Contributor Author

xedin commented Feb 19, 2021

@swift-ci please smoke test

Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

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