Created
April 5, 2016 04:20
-
-
Save kmizu/b3c31da4664ba1d9d4950ecb8b63ba16 to your computer and use it in GitHub Desktop.
Smart Cast Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun foo() { | |
val x: String? = "FOO | |
if(x != null ) { | |
println(x.length) // OK | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment