title: Nullable Int in Swift
body: <p>I am attempting to use a hash that contains a nullable int as a value. The below is the code.</p>
  
  <pre><code>var facs:[(pk:Int,phone:Int?,name:String)] = []
  var phone: AnyObject? = fac["phone"]!
  var phoneLong:Int?;
  if(phone == nil){
      phoneLong = nil
  }
  else{
      phoneLong = phone as? Int
  }
  var id = fac["id"]! as Int
  var name = fac["name"]! as String
  
  facs.append(pk:id, phone:phoneLong, name:name)
  </code></pre>
  
  <p>However, I get a compile error on the <code>facs.append</code> line that states <code>Type 'T' does not conform to protocol 'IntegerLiteralConvertible'</code>. I've tried a few variations, and the only way I can get rid of the error is to make phone a non-nullable int, which is not what I need. Thoughts?</p>