-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Use correct archetype conformance code path for opaque associated types. #26249
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
IRGen: Use correct archetype conformance code path for opaque associated types. #26249
Conversation
@swift-ci Please test |
Build failed |
4c7b1af
to
c3a6842
Compare
@swift-ci Please test |
Build failed |
Build failed |
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.
LGTM
…ted types. The code here was not correct in a situation where an opaque type had constraints that were refinements of the protocol requirements of an associated type, as in: ``` protocol ParentProtocol {} protocol SubProtocol: ParentProtocol {} protocol P { associatedtype A: ParentProtocol func foo() -> A } struct S: P { func foo() -> some SubProtocol } ``` because it assumed that the conformance could be found directly on the opaque type instead of potentially via an arbitrary MetadataPath. Falling through to the code that already correctly handles archetype conformances right below the removed code does the right thing. Fixes rdar://problem/53081207.
c3a6842
to
e12f935
Compare
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test OS X |
The code here was not correct in a situation where an opaque type had constraints that were
refinements of the protocol requirements of an associated type, as in:
because it assumed that the conformance could be found directly on the opaque type instead of
potentially via an arbitrary MetadataPath. Falling through to the code that already correctly
handles archetype conformances right below the removed code does the right thing. Fixes
rdar://problem/53081207.