<html><body><div id="edo-message"><div>Proposal is being worked on.&nbsp;<a href="https://github.com/apple/swift-evolution/pull/552">https://github.com/apple/swift-evolution/pull/552</a></div><div><br></div><div>- Karl<br><br><style>#edo-signature img {max-width: 90%}</style><div id="edo-signature" style="font-family: 'Helvetica Neue','Helvetica',Helvetica,Arial,sans-serif;font:'-apple-system-body';"></div><br><div id="edo-link"></div></div></div><div id="edo-original"><div><br><br><blockquote type="cite" style="margin:1ex 0 0 0;border-left:1px #ccc solid;padding-left:0.5ex;"><div>On Nov 21, 2016 at 1:33 pm, &lt;<a href="mailto:swift-evolution@swift.org">Jakub Bednář via swift-evolution</a>&gt; wrote:<br><br></div><div><pre>Hi fellow Swifters,
<br>
<br>I have just started using the language and was trying to declare an enum inside a protocol.
<br>
<br>protocol WorkingEngine {
<br>   enum States {
<br>          Idle
<br>        Pending
<br>        Working
<br>        Finished
<br>        Canceled  
<br>  }
<br>
<br>  var state: States { get }
<br>}
<br>
<br>The compiler refused this and I had to take the enum outside of the protocol:
<br>
<br>enum WorkingEngineStates {
<br>          Idle
<br>        Pending
<br>        Working
<br>        Finished
<br>        Canceled  
<br>  }
<br>
<br>protocol WorkingEngine {
<br>  var state: WorkingEngineStates { get }
<br>}
<br>
<br>This does not seem coherent with the rest of the language, as enums can be nested in classes, structs and even enums, but not to protocols.  
<br>I haven’t found any proposal for this change. Is this the correct place to request it or get some opinion on the idea?
<br>
<br>Thanks a lot,
<br>
<br>Jakub
<br>
<br>_______________________________________________<br>swift-evolution mailing <a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1">list</a><br><a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1">swift-evolution@swift.org</a><br><a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1">https</a>://lists.swift.org/mailman/listinfo/swift-evolution<br></pre></div></blockquote></div></div></body></html>