[swift-evolution] extending typealiases
Douglas Gregor
dgregor at apple.com
Mon Feb 6 12:08:52 CST 2017
> On Feb 6, 2017, at 10:06 AM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
>
> If I understand correctly, extension of a typealias should be strictly equivalent to extension of type on the right:
>
> extension Any<class> {
> func foo()
> }
> And Any<...> are not nominal types, so until we additionally allow extensions for non-nominal types, this will not compile.
>
Right.
Note that we capriciously banned extending AnyObject so y’all couldn’t sneak in code that would prevent AnyObject from turning into “an existential describing values of class type” :)
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170206/ab7c7690/attachment.html>
More information about the swift-evolution
mailing list