Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Welcome to Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1). Type :help for assistance.
- 1> let an_int: Int = 3
- an_int: Int = 3
- 2> an_int is Int?
- $R0: Bool = true
- 3> [an_int] is [Int?]
- $R1: Bool = true
- 4> let list_of_ints = [an_int]
- list_of_ints: [Int] = 1 value {
- [0] = 3
- }
- 5> list_of_ints is [Int?]
- error: repl.swift:5:14: error: 'Int?' is not a subtype of 'Int'
- list_of_ints is [Int?]
- ~~~~~~~~~~~~~^~~~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement