Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/safecalls/doubleCall.fir.kt
T
2021-01-29 16:55:26 +03:00

7 lines
203 B
Kotlin
Vendored

fun calc(x: List<String>?): Int {
// x should be non-null in arguments list, including inner call
x?.get(x.get(x.size - 1).length)
// but not also here!
return x<!UNSAFE_CALL!>.<!>size
}