Re: [swift-users] Extensions on Typealiased Existential Protocols

2017-06-19 Thread Steven Brunwasser via swift-users
a Pestov via swift-users < swift-users@swift.org> wrote: Hi Steven, On Jun 19, 2017, at 11:44 AM, Steven Brunwasser via swift-users < swift-users@swift.org> wrote: Is this error intentional, or a bug? It’s intentional. We could add support for this as an extra bit of sugar, but note t

[swift-users] Extensions on Typealiased Existential Protocols

2017-06-19 Thread Steven Brunwasser via swift-users
Is this error intentional, or a bug? protocol A {} protocol B {} typealias C = A & B // valid extension C {} // Error: Non-nominal type 'C' (aka 'A & B') cannot be extended extension A where Self: B {} // valid struct Foo: C {} // valid Since extension A where Self: B is the same as

Re: [swift-users] Associatedtype Naming Conventions

2017-05-31 Thread Steven Brunwasser via swift-users
r { > typealias Container = A > } > > struct BuzzImpl: Buzz {} // *error: type ‘BuzzImpl' does not conform to > protocol ‘Buzz'* > > On May 31, 2017 at 4:02:43 PM, Slava Pestov (spes...@apple.com) wrote: > > Can you give an example of a problematic name collision? Does fully

Re: [swift-users] Associatedtype Naming Conventions

2017-05-31 Thread Steven Brunwasser via swift-users
‘BuzzImpl' does not conform to protocol ‘Buzz'* On May 31, 2017 at 4:02:43 PM, Slava Pestov (spes...@apple.com) wrote: Can you give an example of a problematic name collision? Does fully qualifying names not help? Slava On May 31, 2017, at 4:01 PM, Steven Brunwasser via swift-users < swift-us

[swift-users] Associatedtype Naming Conventions

2017-05-31 Thread Steven Brunwasser via swift-users
Hi, I have a library which uses a few generic protocols with identically named associated types that may not always be specified identically by implementors. protocol Foo { associatedtype Container associatedtype Element } protocol Bar { associatedtype Container associatedtype Element } struct