Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/kt32358_1.fir.kt
T
2020-06-19 15:53:00 +03:00

18 lines
323 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.notNull // <- No smart cast in plugin
}