<div dir="ltr">Oops cut and past error!<div><br></div><div><p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="color:rgb(195,34,117)">enum</span> X {</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    <span style="color:rgb(195,34,117)">case</span> L1(l1: L1Type)</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    <span style="color:rgb(195,34,117)">case</span> L2(l2: L2Type)</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    <span style="color:rgb(195,34,117)">enum</span> L1Type {</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">        <span style="color:rgb(195,34,117)">case</span> A, B, C</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    }</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    <span style="color:rgb(195,34,117)">enum</span> L2Type {</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">        <span style="color:rgb(195,34,117)">case</span> D, E, F</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">    }</p>
<p style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">}</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 February 2016 at 11:03, Howard Lovatt <span dir="ltr">&lt;<a href="mailto:howard.lovatt@gmail.com" target="_blank">howard.lovatt@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Isn&#39;t that just a nested enum:<div><br></div><div>    <span style="font-size:13px">enum X {</span></div><span style="font-size:13px">        case L1: L1Type</span><div>        case L2: L2Type<br style="font-size:13px"><span style="font-size:13px">        enum L1Type {</span></div><div><span style="font-size:13px">            case A, B, </span><span style="font-size:13px">C</span></div><div>        }<br style="font-size:13px"><span style="font-size:13px">        enum L2Type {</span><br style="font-size:13px"><span style="font-size:13px">            case D, E, F</span></div><div>       }<br style="font-size:13px"><span style="font-size:13px">}</span></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On 2 February 2016 at 10:53, Amir Michail via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These labels allow you to group items in an enum:<br>
<br>
enum X {<br>
L1:<br>
case A, B<br>
case C<br>
L2:<br>
case D, E, F<br>
}<br>
<br>
switch x {<br>
case L1: handleL1(x)<br>
case L2: handleL2(x)<br>
}<br>
<br>
func handleL1(x:X) {<br>
  switch x L1 {<br>
    case .A: ...<br>
    case .B: ...<br>
    case .D: ...<br>
  }<br>
}<br>
<br>
func handleL2(x:X) {<br>
  switch x L2 {<br>
    case .D: ...<br>
    case .E: ...<br>
    case .F: ...<br>
  }<br>
}<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>  -- Howard.<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">  -- Howard.<br></div>
</div>