<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">If I understand correctly, extension of a typealias should be strictly equivalent to extension of type on the right:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">extension Any<class> {
func foo()
}
</code></pre><p style="margin:0px 0px 1.2em!important">And <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">Any<...></code> are not nominal types, so until we additionally allow extensions for non-nominal types, this will not compile.</p>
<p style="margin:0px 0px 1.2em!important">2017-02-06 20:51 GMT+03:00 Adrian Zubarev via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>>:</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="m_-4622872053031977381bloop_markdown"><p>Just imagining the future. Iff this request will made into the language and we had <code>typealias AnyObject = Any<class></code>, would the following be valid?</p>
<pre><code class="m_-4622872053031977381swift">extension AnyObject {
func foo()
}</code></pre></div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<div title="MDH:SWYgSSB1bmRlcnN0YW5kIGNvcnJlY3RseSwgZXh0ZW5zaW9uIG9mIGEgdHlwZWFsaWFzIHNob3Vs
ZCBiZSBzdHJpY3RseSBlcXVpdmFsZW50IHRvIGV4dGVuc2lvbiBvZiB0eXB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