-
Notifications
You must be signed in to change notification settings - Fork 10.5k
GSB: Fix some issues with concrete same-type requirements #36576
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
GSB: Fix some issues with concrete same-type requirements #36576
Conversation
0f68c29
to
180e5cb
Compare
…tead of the minimized ones We rebuild a signature after dropping redundant conformance requirements, since conformance requirements change the canonical type and conformance access path computation. When doing this, instead of using the canonical requirements from the signature, use the original as-written requirements. This fixes some weirdness around concrete same-type requirements. There's a philosophical benefit here too -- since we rebuild the signature without ever having built the old signature, we never create an invalid GenericSignature in the ASTContext. Fixes rdar://problem/75690903.
21a1c8c
to
99d49f0
Compare
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
@@ -270,7 +270,7 @@ struct X18: P18, P17 { | |||
} | |||
|
|||
// CHECK-LABEL: .X19.foo@ | |||
// CHECK: Generic signature: <T, U where T == X18> | |||
// CHECK: Generic signature: <T, U where T == X18.A> |
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 just a change in printed sugar that doesn't affect the canonical signature. X18.A
is X18
, so we're ending up with this because of T == T.A
vs T == X18
.
@swift-ci Please smoke test macOS |
@swift-ci Please test |
Build failed |
@swift-ci please smoke test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Windows |
Build failed |
Builds upon #36577. Fixes rdar://problem/75656022 and rdar://problem/74395460.