Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.fir.kt
T

14 lines
253 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
class Immutable(val x: String?) {
fun foo(): String {
if (x != null) return x
return ""
}
}
class Mutable(var y: String?) {
fun foo(): String {
if (y != null) return y
return ""
}
}