| Condition | Result |
|---|---|
| "test" is String | true |
| "test" is String? | true |
| null is String | false |
| null is String? | true |
| "test" as String | ok |
| "test" as String? | ok |
| 123 as String | throw |
| 123 as String? | throw |
| null as String | throw |
| null as String? | returns null |
| null as? String | returns null |
| null as? String? | returns null |
Created
December 1, 2017 11:35
-
-
Save rafakob/f0d49f044f91a908d69ec351ed91526c to your computer and use it in GitHub Desktop.
Kotlin - casting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment