> On Sep 28, 2016, at 2:55 AM, Anton Zhilin <[email protected]> wrote:
> 
> I find the limitation of non-intersection of conditional conformance 
> reqirements quite limiting. Can it be lifted in case there are no overloaded 
> functions between extensions?
> 
> protocol A { func foo() }
> protocol B { func bar() }
> 
> extension Array: A where Element: A {
>     func foo() { return self.first!.foo() }
> }
> extension Array: B where Element: B {
>     func bar() { return self.first!.bar() }
> }
> 
> let arr: Array<T>
> arr.foo()
> 
> What is ambiguous here?

Nothing. These conformances are not overlapping, because A and B are 
independent protocols. The first extension declares a conditional conformance 
to A, the second declares a conditional conformance to B.

        - Doug

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to