[swift-evolution] Property with class and protocol type

Adrian Zubarev adrian.zubarev at devandartist.com
Tue Jun 14 16:44:11 CDT 2016


One more thing for clarity:

Any-class requirement: This must be the first requirement, if present. This requirement consists of the keyword class, and requires the existential to be of any class type.

Class requirement: This must be the first requirement, if present. This requirement consists of the name of a class type, and requires the existential to be of a specific class or its subclasses. There can be only one class name constraint, and it is mutually exclusive with the any-class requirement.

Nested any<...>: This requirement consists of another any<...> construct.



-- 
Adrian Zubarev
Sent with Airmail

Am 14. Juni 2016 um 23:42:00, Adrian Zubarev (adrian.zubarev at devandartist.com) schrieb:

Which addresses the fact that nons of the proposals so far truly prevent absurde declarations like:

Let v: Any< UIViewController, UIWindow, UITableViewDelegate>
Let v: UIViewController & UIWindow & UITableViewDelegate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160614/ebf3e81d/attachment.html>


More information about the swift-evolution mailing list