Files
kotlin-fork/idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/doesNotinlineValueIfUsedMoreThanOnce.kt
T
2017-12-26 18:39:47 +03:00

17 lines
241 B
Kotlin
Vendored

fun maybeFoo(): String? {
return "foo"
}
fun <T> doSomething(a: T) {}
fun main(args: Array<String>) {
val foo = maybeFoo()
doSomething(foo)
i<caret>f (foo != null) {
foo.length
}
else {
null
}
}