Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt
T

11 lines
169 B
Kotlin
Vendored

// FIR_IDENTICAL
class MyClass(var p: String?)
fun bar(s: String?): Int {
return s?.length ?: -1
}
fun foo(m: MyClass): Int {
m.p = "xyz"
return bar(m.p)
}