Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Welcome to Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1). Type :help for assistance.
  2. 1> let an_int: Int = 3
  3. an_int: Int = 3
  4. 2> an_int is Int?
  5. $R0: Bool = true
  6. 3> [an_int] is [Int?]
  7. $R1: Bool = true
  8. 4> let list_of_ints = [an_int]
  9. list_of_ints: [Int] = 1 value {
  10. [0] = 3
  11. }
  12. 5> list_of_ints is [Int?]
  13. error: repl.swift:5:14: error: 'Int?' is not a subtype of 'Int'
  14. list_of_ints is [Int?]
  15. ~~~~~~~~~~~~~^~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement