Files
kotlin-fork/compiler/testData/ir/irText/expressions/whileDoWhile.kt
T
vladislav.grechko 9aa8fb80e7 Set correct IR origins for inc/dec operations
NB: in order to produce correct IR origins, the source element kinds for
some FIR elements has been changed. As a side effect, mapping PSI to FIR
slightly changed: namely, for `a[b]++`, `a[b]` used to be mapped on
`set` call or callable reference, but now it is mapped on `get` call.

^KT-61891: Fixed
^KT-64387: Fixed
2024-01-30 14:26:10 +00:00

19 lines
349 B
Kotlin
Vendored

// FIR_IDENTICAL
fun test() {
var x = 0
while (x < 0);
while (x < 5) x++
while (x < 10) { x++ }
do while (x < 0)
do {} while (x < 7)
do x++ while (x < 15)
do { x ++ } while (x < 20)
}
fun testSmartcastInCondition() {
val a: Any? = null
if (a is Boolean) {
while (a) {}
do {} while (a)
}
}