Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/kt32358_1.fir.kt
T
2020-01-30 14:38:02 +03:00

18 lines
352 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
class MyChild {
val nullableString: String? = null
val notNull = ""
}
class MyParent {
val child: MyChild? = MyChild()
}
fun myFun() {
val myParent = MyParent()
myParent.child?.nullableString ?: run { return }
myParent.child.<!INAPPLICABLE_CANDIDATE!>notNull<!> // <- No smart cast in plugin
}