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

6 lines
175 B
Kotlin
Vendored

fun calc(x: List<String>?): Int {
// x is not-null only inside subList
x?.subList(0, x.size - 1)<!UNSAFE_CALL!>.<!>get(x<!UNSAFE_CALL!>.<!>size)
return x!!.size
}