-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Sema: Implement missing part of SE-0346 #81949
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
Sema: Implement missing part of SE-0346 #81949
Conversation
a27fa64
to
2183880
Compare
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
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.
Will we be fine (error) if there’s another kind of explicit type witness?
} else if (auto *pct = inheritedTy->getAs<ProtocolCompositionType>()) { | ||
for (auto member : pct->getMembers()) { | ||
collectProtocolsFromInheritedEntry(entry, member, | ||
protocolsWithRetroactiveAttr, protos); | ||
} |
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 we have a test case for a nested composition?
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.
I'll add one
2183880
to
235db43
Compare
@AnthonyLatsis it would crash on ambiguity. I added a little bit of logic that makes us now diagnose an ambiguity error. |
235db43
to
28575b0
Compare
The proposal states that this should work, but this was never implemented: protocol P<A> { associatedtype A } struct S: P<Int> {} - Fixes swiftlang#62906. - Fixes rdar://91842338.
…oseRetroactiveConformances()
28575b0
to
185a91d
Compare
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
The proposal states that this should work, but this was never implemented: