-
Notifications
You must be signed in to change notification settings - Fork 10.5k
RequirementMachine: Leave behind conflicting requirements in the minimized signature #61064
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
RequirementMachine: Leave behind conflicting requirements in the minimized signature #61064
Conversation
@@ -0,0 +1,16 @@ | |||
// RUN: %target-typecheck-verify-swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind sticking to the issue-*
format for file names? This is the one I'm planning to use once I start renaming all the sr*
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
746050b
to
f100708
Compare
…mized signature Requirement lowering only expects that it won't see two requirements of the same kind (except for conformance requirements). So only mark those as conflicting. This addresses a crash-on-invalid and improves diagnostics for move-only generics, because a conflict won't drop the copyability of a generic parameter and expose a move-only-naive user to confusing error messages. Fixes swiftlang#61031. Fixes swiftlang#63997. Fixes rdar://problem/111991454.
f100708
to
70c9f8a
Compare
@swift-ci Please smoke test |
// EXT_ASSOC_MEMBER_2: Begin completions, {{.*}} items | ||
// EXT_ASSOC_MEMBER_2: Keyword/None: Type[#Int.Type#]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regression. Do you know how it used to get parsed or why the behavior might have changed?
…ht-hand side in generic where clause Fixes the issue in swiftlang#61064 (comment)
Requirement lowering only expects that it won't see two requirements
of the same kind (except for conformance requirements). So only mark
those as conflicting.
This addresses a crash-on-invalid and improves diagnostics for
move-only generics, because a conflict won't drop the copyability
of a generic parameter and expose a move-only-naive user to
confusing error messages.
Fixes #61031.
Fixes #63997.
Fixes rdar://problem/111991454.