<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 <<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> 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 <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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<T> & P' is just 'C<T>' in this example. You'd need a refinement of 'P' to make it interesting ('C<T> & 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 `<T: C<U>>` 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 & Q</div><div class=""><br class=""></div><div class="">-Joe</div></body></html>