Open keith opened 6 years ago
@swift-ci create
All of these ought to be ambiguous in principle. We really shouldn't have different behavior in different contexts, and ideally 4.1 would preserve whatever behavior 4.0 had.
Wait, why? Any type that conforms to both `ProtocolA` and `ProtocolB` would be required by the compiler to implement an unambiguous `foo` that fulfills both requirements, no?
I suppose in practice since ProtocolA and ProtocolB are in the same module here, you wouldn't in practice be able to make a type that has a different witness for both (without using @_implements
). In full generality the conformances for ProtocolA and ProtocolB could have been formed independently, and we may expose the ability to map implementations to conformances explicitly with user-facing syntax.
Environment
Xcode 9.3b4Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, 4.1Regression, TypeChecker | |Assignee | None | |Priority | Medium | md5: 4da24ed90ea99125ba6a2319ee32474erelates to:
Issue Description:
With this code:
With Xcode 9.3b4 and Swift 4.1 you get this error at compile time:
This doesn't error with Xcode 9.2 and Swift 4.0.