title: Swift optional variable assignment with default value (double question marks)
body: <p>So I was trying to do</p>
  
  <pre><code>let foo = dict["key"] as? String ?? "empty"
  var bar = some_func(string: foo!)
  </code></pre>
  
  <p>and XCode 6 complains that<br>
  <code>Operand of postfix '!' should have optional type; type is 'String'</code><br>
  on the second line. </p>
  
  <p>If I change the first line to</p>
  
  <pre><code>let foo: String? = dict["key"] as? String ?? "empty"
  </code></pre>
  
  <p>the error goes away.</p>
  
  <p>Is this some kind of flaw or am I just doing something wrong?</p>