title: Swift CoreData -- Cannot assign value of type 'Int' to type 'Int16'
body: <p>I declared a CoreData entity Address with a 'zip' attribute of type Int16.</p>
  
  <p>Problem is, when I assign an integer to that attribute:</p>
  
  <pre><code>address?.zip = Int(zipField.text!)
  </code></pre>
  
  <p>I get an error saying Cannot assign value of type Int to type Int16. Makes sense (I guess).</p>
  
  <p>Problem is, when I try casting that int to an Int16, XCode still blows up on me:</p>
  
  <pre><code>let zip:Int? = Int(zipField.text!)
  if zip != nil {
      let zip16 = Int16(zip!)
  }
  </code></pre>
  
  <p>It's that line where I convert the integer that causes XCode to crash. I am not really seeing any information in the error message, so I'm not sure what to try.</p>
  
  <p>In general, should I be using Int64 because of the operating system of these phones?</p>