Skip to content

RequirementMachine: Minor diagnostics fixes #42133

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 9 commits into from
Apr 1, 2022

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov requested a review from hborla April 1, 2022 05:16
We were building the signature twice, and adding the 'where' clause twice
each time.

The GSB magically uniqued them, whereas the Requirement Machine is not
so forgiving.
…a GenericParamList

Otherwise, we'll end up visiting it twice in InferredGenericSignatureRequest.
The GSB uniques requirements seen this way, whereas the Requirement Machine
does not, leading to redundant requirement diagnostics.
@slavapestov slavapestov force-pushed the rqm-minor-diagnostics-fixes branch from 31ca258 to 2b766c2 Compare April 1, 2022 17:55
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 16d204b into swiftlang:main Apr 1, 2022
@@ -41,8 +41,7 @@ protocol P5b: P5a where A == Self {}
struct S5<X>: P5b {} // OK, A := S5<X>


protocol P6 where A == Never { // expected-error {{same-type constraint type 'Never' does not conform to required protocol 'P6'}}
// expected-error@+2 {{same-type constraint type 'Never' does not conform to required protocol 'P6'}}
protocol P6 where A == Never { // expected-error {{no type for 'Self.A' can satisfy both 'Self.A == Never' and 'Self.A : P6'}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The new phrasing here sounds like a loss of clarity. Are the old phrasings on their way out?

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