<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=""><div><blockquote type="cite" class=""><div class="">On Mar 13, 2017, at 10:56 AM, rintaro ishizaki 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 dir="ltr" class=""><div class=""><div class=""><span style="font-family:monospace,monospace" class="">final class First {</span><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class=""> let item: First</font></div><div class=""><font face="monospace, monospace" class=""> init(item: First) {</font></div><div class=""><font face="monospace, monospace" class=""> self.item = item</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class="">}</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">extension First {</font></div><div class=""><font face="monospace, monospace" class=""> convenience init() {</font></div><div class=""><font face="monospace, monospace" class=""> self.init(item: self)</font></div><div class=""><font face="monospace, monospace" class=""> }</font></div><div class=""><font face="monospace, monospace" class="">}</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">let a = First()</font></div></div><div class=""><br class=""></div><div class="">I'm actually a bit surprised that this compiles.</div></div><div class="">This should be diagnosed as: <font face="monospace, monospace" class="">"error: 'self' used before self.init call" </font>I think.</div></div></div></blockquote><div><br class=""></div>Yes, it should.</div><div><br class=""></div><div>John.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-03-13 23:42 GMT+09:00 Dimitri Racordon <span dir="ltr" class=""><<a href="mailto:Dimitri.Racordon@unige.ch" target="_blank" class="">Dimitri.Racordon@unige.ch</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
But then!
<div class=""><br class="">
</div>
<div class="">The following still shouldn’t compile:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(186,45,162)" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">final</span><span style="font-variant-ligatures: no-common-ligatures;" class="">
</span><span style="font-variant-ligatures:no-common-ligatures" class="">class</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> First {</span></div><span class="">
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#ba2da2" class="">let</span><span style="font-variant-ligatures:no-common-ligatures" class=""> item:
</span><span style="font-variant-ligatures:no-common-ligatures;color:#4f8187" class="">First</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#ba2da2" class="">init</span><span style="font-variant-ligatures:no-common-ligatures" class="">(item:
</span><span style="font-variant-ligatures:no-common-ligatures;color:#4f8187" class="">First</span><span style="font-variant-ligatures:no-common-ligatures" class="">) {</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""> </span>
<span style="font-variant-ligatures:no-common-ligatures;color:#ba2da2" class="">self</span><span style="font-variant-ligatures:no-common-ligatures" class="">.</span><span style="font-variant-ligatures:no-common-ligatures;color:#4f8187" class="">item</span><span style="font-variant-ligatures:no-common-ligatures" class="">
= item</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">}</span></div>
</span></div>
<div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class="">
</span></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>