Files
kotlin-fork/idea/testData/intentions/branched/ifThenToDoubleBang/lhsEqualsNull.kt
T
2014-04-22 22:33:08 +04:00

13 lines
207 B
Kotlin

// WITH_RUNTIME
fun maybeFoo(): String? {
return "foo"
}
fun main(args: Array<String>) {
val foo = maybeFoo()
if (foo == null<caret>)
throw NullPointerException()
else
foo
}