<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Is this error intentional, or a bug?</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)">protocol<span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span>A {}</span></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica; : 14px;"><br></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)">protocol<span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span>B {}</span></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica; : 14px;"><br></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)">typealias<span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span>C =<span class="Apple-converted-space"> </span></span><span style="color:rgb(52,149,175)">A</span><span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span>&amp;<span class="Apple-converted-space"> </span></span><span style="color:rgb(52,149,175)">B</span><span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span></span><span style="color:rgb(0,143,0)">// valid</span></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica; : 14px;"><br></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;line-height:normal"><span style="font-family:Menlo;font-size:11px;color:rgb(4,51,255);text-decoration:underline">e</span><span style="font-family:Menlo;font-size:11px;color:rgb(4,51,255)">xtension</span><span class="Apple-converted-space"> </span><span style="font-family:Menlo;font-size:11px;color:rgb(52,149,175)">C</span><font face="Menlo"><span style="font-size:11px"><span class="Apple-converted-space"> </span>{}<span class="Apple-converted-space"> </span></span></font><span style="background-color:rgb(255,92,98)"><span style="font-size:11px;font-family:Menlo">// Error: Non</span><span style="font-size:11px;font-family:Menlo">-nominal type &#39;C&#39; (aka &#39;A &amp; B&#39;) cannot be extended </span></span></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica; : 14px;"><br></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)">extension<span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span></span><span style="color:rgb(52,149,175)">A</span><span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span></span>where<span style="color:rgb(0,0,0)"><span class="Apple-converted-space"> </span></span>Self<span style="color:rgb(0,0,0)">: B {}<span class="Apple-converted-space"> </span></span><span style="color:rgb(0,143,0)">// valid</span></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica; : 14px;"><br></p></div></div><div><div id="bloop_customfont" style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:rgb(4,51,255)">struct</span><span class="Apple-converted-space"> </span>Foo:<span class="Apple-converted-space"> </span><span style="color:rgb(52,149,175)">C</span><span class="Apple-converted-space"> </span>{}<span class="Apple-converted-space"> </span><span style="color:rgb(0,143,0)">// valid</span></p></div></div></blockquote><p><br></p><p>Since <span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">extension</span><span style="font-family:Menlo;font-size:11px"> </span><span style="font-family:Menlo;font-size:11px;color:rgb(52,149,175)">A</span><span style="font-family:Menlo;font-size:11px"> </span><span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">where</span><span style="font-family:Menlo;font-size:11px"> </span><span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">Self</span><span style="font-family:Menlo;font-size:11px">: B</span> is the same as <span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">extension</span><span style="font-family:Menlo;font-size:11px"> </span><span style="font-family:Menlo;font-size:11px;color:rgb(52,149,175)">B</span><span style="font-family:Menlo;font-size:11px"> </span><span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">where</span><span style="font-family:Menlo;font-size:11px"> </span><span style="color:rgb(4,51,255);font-family:Menlo;font-size:11px">Self</span><span style="font-family:Menlo;font-size:11px">: A</span>, and <span style="font-family:Menlo;font-size:11px">C</span> is defined as any <span style="font-family:Menlo;font-size:11px">A</span> that also inherits from <span style="font-family:Menlo;font-size:11px">B</span>, shouldn’t <span style="font-family:Menlo;font-size:11px;color:rgb(4,51,255);text-decoration:underline">e</span><span style="font-family:Menlo;font-size:11px;color:rgb(4,51,255)">xtension</span> <span style="font-family:Menlo;font-size:11px;color:rgb(52,149,175)">C</span> be just as valid?</p><p>This seems like it should be valid, so I filed this bug, <a href="https://bugs.swift.org/browse/SR-5260">https://bugs.swift.org/browse/SR-5260</a>.</p><p>- Steve</p></body></html>