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

13 lines
251 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_EXPRESSION
// See KT-27260
class A(val x: String?) {
fun foo(other: A) {
when {
x == null && other.x == null -> "1"
x<!UNSAFE_CALL!>.<!>length > 0 -> "2"
}
}
}