[IR] dumpKotlinLike: add testdata for FIR tests
This commit is contained in:
committed by
teamcityserver
parent
d7bd4240e1
commit
c68040753d
@@ -0,0 +1,39 @@
|
||||
fun test() {
|
||||
var x: Int = 0
|
||||
while (less(arg0 = x, arg1 = 0)) { // BLOCK
|
||||
}
|
||||
while (less(arg0 = x, arg1 = 5)) { // BLOCK
|
||||
val <unary>: Int = x
|
||||
x = <unary>.inc()
|
||||
<unary>
|
||||
}
|
||||
while (less(arg0 = x, arg1 = 10)) { // BLOCK
|
||||
val <unary>: Int = x
|
||||
x = <unary>.inc()
|
||||
<unary>
|
||||
}
|
||||
do// COMPOSITE {
|
||||
// } while (less(arg0 = x, arg1 = 0))
|
||||
do{ // BLOCK
|
||||
val <unary>: Int = x
|
||||
x = <unary>.inc()
|
||||
<unary>
|
||||
} while (less(arg0 = x, arg1 = 15))
|
||||
do// COMPOSITE {
|
||||
val <unary>: Int = x
|
||||
x = <unary>.inc()
|
||||
<unary>
|
||||
// } while (less(arg0 = x, arg1 = 20))
|
||||
}
|
||||
|
||||
fun testSmartcastInCondition() {
|
||||
val a: Any? = null
|
||||
when {
|
||||
a is Boolean -> { // BLOCK
|
||||
while (a /*as Boolean */) { // BLOCK
|
||||
}
|
||||
do// COMPOSITE {
|
||||
// } while (a /*as Boolean */)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user