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

16 lines
238 B
Kotlin

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