title: Check availability in switch statement
body: <p>if a <code>Enum</code> type add new <code>case</code> in new os version，how to check availability in <code>switch</code> statement？
  Like a <code>Enum</code> in <code>StoreKit</code> below</p>
  
  <pre><code>public enum Code : Int {
      public typealias _ErrorType = SKError
      case unknown
      case clientInvalid 
      case paymentCancelled 
      case paymentInvalid 
      case paymentNotAllowed
      case storeProductNotAvailable
      @available(iOS 9.3, *)
      case cloudServicePermissionDenied 
      @available(iOS 9.3, *)
      case cloudServiceNetworkConnectionFailed
      @available(iOS 10.3, *)
      case cloudServiceRevoked
  }
  </code></pre>
  
  <p>Is below code the only solution? It's too redundant.</p>
  
  <pre><code>if #available(iOS 10.3, *) {
      switch code {
          //all cases available in 10.3
          ...
      }
  } else if #available(iOS 9.3, *) {
      switch code {
         //all cases available in 9.3
         ...
      }
  } else {
      switch code {
          //all cases available below 9.3
          ...
      }
  }
  </code></pre>
  
  <p>-----------------new-------------------------</p>
  
  <p>I think It's not a question. All cases writed in one <code>switch</code> is fine, <code>if</code> statement is unneccessary.  Because new added cases would not called in low iOS version.</p>