<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="">The “*” in @available means “all other platforms”. If you want to mark something <i class="">unavailable</i>&nbsp;on a particular platform, you’ll have to use the long form of the @available attribute. There’s currently no way to mark something “only available on these platforms”.</div><div class=""><br class=""></div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On May 25, 2016, at 18:48, Stuart Breckenridge via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Presently, you can mark enum cases as <font face="Menlo" class="">@available</font> but it has no impact. Take the following example:<div class=""><br class=""></div><div class=""><font face="Menlo" class="">enum Things:String {</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>@available (iOS 9.3, *) case MobileThing = "com.example.mobilething"</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>@available (OSX 10.11, *) case DesktopThing = "com.example.desktopthing"</font></div><div class=""><font face="Menlo" class="">}</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Despite the above compiling, the following code will run iOS with no warnings:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">func takesA(thing:Things) {</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>print(thing)</font></div><div class=""><font face="Menlo" class="">}</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">takesA(.DesktopThing)</font></div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Are there enough compelling use-cases for @available on enum cases to be considered? At the very least, if <font face="Menlo" class="">@available</font> doesn't do anything on cases, it shouldn't be permitted.</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>