Jakub, try this...<br><br>struct WorkingEngine {<br>  enum States {<br>     case idle<br>  }<br>}<br><br>Then you can call it<br><br>WorkingEngine.States.idle<br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 21, 2016 at 9:56 AM Karl Wagner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div id="m_-5205792744962649601edo-message" class="gmail_msg"><div class="gmail_msg">Proposal is being worked on. <a href="https://github.com/apple/swift-evolution/pull/552" class="gmail_msg" target="_blank">https://github.com/apple/swift-evolution/pull/552</a></div></div></div><div class="gmail_msg"><div id="m_-5205792744962649601edo-message" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">- Karl<br class="gmail_msg"><br class="gmail_msg"><div id="m_-5205792744962649601edo-signature" style="font-family:&#39;Helvetica Neue&#39;,&#39;Helvetica&#39;,Helvetica,Arial,sans-serif;font:&#39;-apple-system-body&#39;" class="gmail_msg"></div><br class="gmail_msg"><div id="m_-5205792744962649601edo-link" class="gmail_msg"></div></div></div></div><div class="gmail_msg"><div id="m_-5205792744962649601edo-original" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" style="margin:1ex 0 0 0;border-left:1px #ccc solid;padding-left:0.5ex" class="gmail_msg"><div class="gmail_msg">On Nov 21, 2016 at 1:33 pm, &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">Jakub Bednář via swift-evolution</a>&gt; wrote:<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><pre class="gmail_msg">Hi fellow Swifters,
<br class="gmail_msg">
<br class="gmail_msg">I have just started using the language and was trying to declare an enum inside a protocol.
<br class="gmail_msg">
<br class="gmail_msg">protocol WorkingEngine {
<br class="gmail_msg">   enum States {
<br class="gmail_msg">          Idle
<br class="gmail_msg">        Pending
<br class="gmail_msg">        Working
<br class="gmail_msg">        Finished
<br class="gmail_msg">        Canceled  
<br class="gmail_msg">  }
<br class="gmail_msg">
<br class="gmail_msg">  var state: States { get }
<br class="gmail_msg">}
<br class="gmail_msg">
<br class="gmail_msg">The compiler refused this and I had to take the enum outside of the protocol:
<br class="gmail_msg">
<br class="gmail_msg">enum WorkingEngineStates {
<br class="gmail_msg">          Idle
<br class="gmail_msg">        Pending
<br class="gmail_msg">        Working
<br class="gmail_msg">        Finished
<br class="gmail_msg">        Canceled  
<br class="gmail_msg">  }
<br class="gmail_msg">
<br class="gmail_msg">protocol WorkingEngine {
<br class="gmail_msg">  var state: WorkingEngineStates { get }
<br class="gmail_msg">}
<br class="gmail_msg">
<br class="gmail_msg">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 class="gmail_msg">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 class="gmail_msg">
<br class="gmail_msg">Thanks a lot,
<br class="gmail_msg">
<br class="gmail_msg">Jakub
<br class="gmail_msg">
<br class="gmail_msg">_______________________________________________<br class="gmail_msg">swift-evolution mailing <a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" class="gmail_msg" target="_blank">list</a><br class="gmail_msg"><a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg"><a dir="ltr" href="mailto:listswift-evolution@swift.orghttps" class="gmail_msg" target="_blank">https</a>://<a href="http://lists.swift.org/mailman/listinfo/swift-evolution" class="gmail_msg" target="_blank">lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg"></pre></div></blockquote></div></div></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>