title: Exhaustive condition of switch case in Swift
body: <p>The Apple <a href="https://developer.apple.com/library/ios/documentation/swift/conceptual/Swift_Programming_Language/ControlFlow.html" rel="noreferrer">documentation</a> says</p>
  
  <blockquote>
    <p>Every switch statement must be exhaustive. That is, every possible
    value of the type being considered must be matched by one of the
    switch cases.</p>
  </blockquote>
  
  <p>So in new Xcode I have placed a code like this</p>
  
  <pre><code>println(UInt16.min); // Output : '0'
  println(UInt16.max); // Output : '65535'
  
  var quantity : UInt16 = 10;
  
  switch quantity {
  case 0...65535: //OR case UInt16.min...UInt16.max:
      println();
  default:
      println();
  }
  </code></pre>
  
  <p>Now if i remove the default section I get a compiler error:</p>
  
  <blockquote>
    <p>Switch must be exhaustive<br>
    Do you want to add missing cases? Fix</p>
  </blockquote>
  
  <p>So my question is for a case that I have mentioned as <code>case 0...65535:</code> have I not mentioned all the case values for an <code>UInt16</code> ?? But still I am getting an error ?? Why am I getting this error, Did i miss something ??</p>