> [Apologies if this is in Swift 4 already.] > > We can have generic parameters match a protocol. But I have an idea in my > head that involves the type NOT conforming to a protocol. I don’t think we > have a way currently to work with this. Why do you want that? When something conforms, you know that you can call the methods of the protocol, but without conformance, you can't do anything that's not possible using "is". Also: Don't forget retroactive conformance — you can never rely on non-conformance. _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution
Re: [swift-evolution] [Pitch][Bug?] Test for Anti-Conformance During Generics
Tino Heth via swift-evolution Sun, 30 Jul 2017 14:04:10 -0700
- [swift-evolution] [Pitch][Bug?] Test fo... Daryle Walker via swift-evolution
- Re: [swift-evolution] [Pitch][Bug?... Tino Heth via swift-evolution
- Re: [swift-evolution] [Pitch][... Robert Bennett via swift-evolution
- Re: [swift-evolution] [Pitch][... Daryle Walker via swift-evolution
- Re: [swift-evolution] [Pit... Xiaodi Wu via swift-evolution
- Re: [swift-evolution] ... Daryle Walker via swift-evolution
- Re: [swift-evolut... Adrian Zubarev via swift-evolution
- Re: [swift-evolut... Daryle Walker via swift-evolution
- Re: [swift-ev... Robert Widmann via swift-evolution
- Re: [swif... Daryle Walker via swift-evolution