https://kotlinlang.org logo
e

ean5533

07/30/2016, 1:12 AM
Copy code
val foo: String? = ""
if (foo?.toString() != null) {
    // won't compile without this check, but compiler could infer it
    if (foo == null)
        return;

    val bar: String = foo;
}