title: 'as' test is always true warning in Swift switch statement
body: <p>I'm using <code>as Int</code> in a <code>switch</code> case to unwrap an optional.  It works, but the compiler gives the warning <strong>'as' test is always true</strong>.  That is a <em>lie</em> of course because the <code>as</code> only succeeds if the value is not <code>nil</code>.</p>
  
  <p>Consider this minimal, verifiable example:</p>
  
  <pre><code>var age: Int?
  
  switch age {
  case let y as Int:    // warning: 'as' test is always true
      print(y)
  case nil:
      print("it is nil")
  }
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>it is nil</p>
  </blockquote>
  
  <p><strong>Questions:</strong> What is Swift thinking here with that warning and is there a better way to unwrap the value without having to use a force unwrap?</p>