Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/smartCastWithOrFalse.kt
T
Nikolay Lunyak dd85a81d45 [FIR] Add a minimized alternative for orOperatorWithConstant.kt
It was decided to leave this code as is, because supporting
it would probably require introducing Implication-statements,
but this is not a good-enough use-case for such work.
2024-01-09 10:47:14 +00:00

9 lines
165 B
Kotlin
Vendored

fun main(x: Any?) {
if (x is String || false) {
<!DEBUG_INFO_SMARTCAST!>x<!>.length
}
else {
x.<!UNRESOLVED_REFERENCE!>length<!>
}
}