<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 28, 2017, at 10:39 PM, David Hart &lt;<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><br class="Apple-interchange-newline">On 28 Feb 2017, at 22:53, Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" applecontenteditable="true" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">Nitpick: 'C&lt;T&gt; &amp; P' is just 'C&lt;T&gt;' in this example. You'd need a refinement of 'P' to make it interesting ('C&lt;T&gt; &amp; Q’).</div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Could generic specialisation be disallowed in constraints? I need to think about this.</div></div></blockquote></div><br class=""><div class="">I don't think there's any added complexity alone in allowing generic base class constraints in existentials, since we already support `&lt;T: C&lt;U&gt;&gt;` as a constraint on a generic parameter. It's the interaction between classes and protocols with associated types that's interesting. You don't even need a generic class:</div><div class=""><br class=""></div><div class="">protocol P { associatedtype T; func foo(_: T) }</div><div class="">class C: P { func foo(_: Int) {} }</div><div class=""><br class=""></div><div class="">protocol Q: P {}</div><div class=""><br class=""></div><div class="">let x: C &amp; Q</div><div class=""><br class=""></div><div class="">-Joe</div></body></html>