[IR] add testdata for dumpKotlinLike

This commit is contained in:
Zalim Bashorov
2020-11-05 02:47:53 +03:00
committed by teamcityserver
parent d2022ab115
commit 8d5facb15f
365 changed files with 15516 additions and 0 deletions
@@ -0,0 +1,133 @@
object X1 {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
var x1: Int
field = 0
get
set
object X2 {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
var x2: Int
field = 0
get
set
object X3 {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
var x3: Int
field = 0
get
set
}
}
}
fun test1(a: IntArray) {
var i: Int = 0
{ //BLOCK
val tmp1_array: IntArray = a
val tmp2_index0: Int = { //BLOCK
val tmp0: Int = i
i = tmp0.inc()
tmp0
}
val tmp3: Int = tmp1_array.get(index = tmp2_index0)
tmp1_array.set(index = tmp2_index0, value = tmp3.inc())
tmp3
} /*~> Unit */
}
fun test2() {
{ //BLOCK
val tmp0_this: X1 = X1
{ //BLOCK
val tmp1: Int = tmp0_this.<get-x1>()
tmp0_this.<set-x1>(<set-?> = tmp1.inc())
tmp1
}
} /*~> Unit */
{ //BLOCK
val tmp2_this: X2 = X2
{ //BLOCK
val tmp3: Int = tmp2_this.<get-x2>()
tmp2_this.<set-x2>(<set-?> = tmp3.inc())
tmp3
}
} /*~> Unit */
{ //BLOCK
val tmp4_this: X3 = X3
{ //BLOCK
val tmp5: Int = tmp4_this.<get-x3>()
tmp4_this.<set-x3>(<set-?> = tmp5.inc())
tmp5
}
} /*~> Unit */
}
class B {
constructor(s: Int = 0) /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
var s: Int
field = s
get
set
}
object Host {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
operator fun B.plusAssign(b: B) {
{ //BLOCK
val tmp0_this: B = <this>
tmp0_this.<set-s>(<set-?> = tmp0_this.<get-s>().plus(other = b.<get-s>()))
}
}
}
fun Host.test3(v: B) {
<this>.plusAssign($receiver = v, b = TODO("IrConstructorCall"))
}