This seems like a better solution to me. The other one smacks of goto. <br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 14, 2016 at 20:52 Zhao Xin via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif">I manage to use below work around.</div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">let</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> count = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">1</span></p></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif">
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"></span><br class="gmail_msg"></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">switch</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(79,129,135)" class="gmail_msg">count</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">0</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">1</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">:</span></p>
</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">let</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> buttonId = </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertThirdButtonReturn</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">let</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> shouldFallthrough = { () -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)" class="gmail_msg">Bool</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">in</span></p></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif">
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">switch</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> buttonId {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertFirstButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertSecondButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertThirdButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">)</span></p>
</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">return</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">true</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">default</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">fatalError</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">()</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> }</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">return</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">false</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> }()</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">if</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> shouldFallthrough { </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">fallthrough</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> }</span></p></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif">
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">default</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">"do extra things"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">}</span></p></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif">Zhaoxin</div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Sat, Oct 15, 2016 at 10:44 AM, Zhao Xin <span dir="ltr" class="gmail_msg"><<a href="mailto:owenzx@gmail.com" class="gmail_msg" target="_blank">owenzx@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_default gmail_msg" style="font-family:georgia,serif">I thought below code would work. It didn't.</div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">let</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> count = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">1</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"></span><br class="gmail_msg"></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">outerSwitch: </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">switch</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(79,129,135)" class="gmail_msg">count</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">0</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">1</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">let</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> buttonId = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)" class="gmail_msg">0</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">switch</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> buttonId {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertFirstButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertSecondButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">case</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">NSAlertThirdButtonReturn</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">"do something"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)" class="gmail_msg">fallthrough</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> outerSwitch // error here</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">default</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">fatalError</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">()</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> }</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">default</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">:</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)" class="gmail_msg">print</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">(</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">"do extra things"</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)" class="gmail_msg">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">}</span></p></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif">So I have to use `if - else if - else` instead. I think if `fallthrouh` works with `label`, the code will be more elegant.</div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif">Zhaoxin</div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-family:georgia,serif"><br class="gmail_msg"></div></div>
</blockquote></div><br class="gmail_msg"></div>
_______________________________________________<br class="gmail_msg">
swift-users mailing list<br class="gmail_msg">
<a href="mailto:swift-users@swift.org" class="gmail_msg" target="_blank">swift-users@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br class="gmail_msg">
</blockquote></div>