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.

2017-02-06 20:51 GMT+03:00 Adrian Zubarev via swift-evolution <
[email protected]>:

Just imagining the future. Iff this request will made into the language and
> we had typealias AnyObject = Any<class>, would the following be valid?
>
> extension AnyObject {
>     func foo()
> }
>
> ​
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to