<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 class="">Oops, hit Send too soon…</div><br class=""><div><blockquote type="cite" class=""><div class="">Pyry Jahkola wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><span class="" style="font-family: Menlo;">&nbsp; &nbsp;&nbsp;</span><b class="" style="font-family: Menlo;">import</b><span class="" style="font-family: Menlo;">&nbsp;A</span><font color="#919191" class="" style="font-family: Menlo;">&nbsp; &nbsp; &nbsp; // ok, unqualified import keeps A as a second-class identifier</font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><span class="" style="font-family: Menlo;">&nbsp; &nbsp;&nbsp;</span><b class="" style="font-family: Menlo;">import</b><span class="" style="font-family: Menlo;"><span class="Apple-converted-space">&nbsp;</span>B<span class="Apple-converted-space">&nbsp;</span></span><b class="" style="font-family: Menlo;">as</b><span class="" style="font-family: Menlo;"><span class="Apple-converted-space">&nbsp;</span>B</span><font color="#919191" class="" style="font-family: Menlo;"><span class="Apple-converted-space">&nbsp;</span>// ok, qualified import makes B a first-class identifier in file scope</font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font color="#919191" class="" style="font-family: Menlo;">&nbsp; &nbsp;&nbsp;</font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font face="Menlo" class="">&nbsp; &nbsp;&nbsp;<b class="">typealias</b>&nbsp;A = Int<span class="Apple-converted-space">&nbsp;</span><font color="#919191" class="">// ok, shadows the module name A</font></font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font face="Menlo" class=""><font color="#919191" class="">&nbsp; &nbsp;&nbsp;</font></font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font face="Menlo" class="">&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><font color="#ff2600" class=""><b class="">typealias</b><span class="Apple-converted-space">&nbsp;</span>B = Int</font></font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font face="Menlo" class=""><font color="#919191" class="">&nbsp; &nbsp; //<span class="Apple-converted-space">&nbsp;</span></font><b class=""><font color="#ff2600" class="">error:</font></b><font color="#919191" class=""><span class="Apple-converted-space">&nbsp;</span>invalid redeclaration of 'Bar'</font></font></div><div class="" style="font-family: Helvetica; font-size: 13px; 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;"><font face="Menlo" color="#919191" class="">&nbsp; &nbsp; //<span class="Apple-converted-space">&nbsp;</span><b class="">note:</b><span class="Apple-converted-space">&nbsp;</span>previously declared here: 'import Bar as Bar'</font></div></div></blockquote></div><br class="">

Of course that last error message was meant to read:<div class=""><br class=""></div><div class=""><div class=""><div class=""><font face="Menlo" class=""><font color="#919191" class="">&nbsp; &nbsp; //&nbsp;</font><b class=""><font color="#ff2600" class="">error:</font></b><font color="#919191" class="">&nbsp;invalid redeclaration of 'B'</font></font></div></div><div class=""><font face="Menlo" color="#919191" class="">&nbsp; &nbsp; //&nbsp;<b class="">note:</b>&nbsp;previously declared here: 'import B as B'</font></div></div><div class=""><br class=""></div><div class="">— Pyry</div><div class=""><br class=""></div></body></html>