Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.kt
T
2020-03-19 09:51:01 +03:00

15 lines
203 B
Kotlin
Vendored

// !DUMP_CFG
class A {
fun foo() {}
}
fun test(b: Boolean) {
val a: A?
if (b) {
a = A()
a.foo()
} else {
a = null
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
}