[swift-evolution] Proposal: Change of syntax for class protocols
Stephen Celis
stephen.celis at gmail.com
Tue Dec 8 10:55:13 CST 2015
On Tue, Dec 8, 2015 at 11:52 AM, Daniel Valls Estella via swift-evolution <
swift-evolution at swift.org> wrote:
> Just to clarify.
>
> I think maybe it’s better to move away class constrain from protocol
> definitions
> and enable such type of restriction when requesting elements alongside
> with type/protocol conformance requirements.
>
> func doSomething(localvar: MyProtocol class)
>
Doesn't the following work?
func doSomething(localvar: protocol<MyProtocol, class>)
You could, of course, use a typealias or protocol inheritance to avoid
"protocol<...>".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151208/09758a61/attachment.html>
More information about the swift-evolution
mailing list