[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,34 @@
fun test1() {
val x: Int
val x$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
local get(): Int {
return getValue<Int>($receiver = x$delegate, thisRef = null, property = ::x)
}
println(message = <get-x>())
}
fun test2() {
var x: Int
val x$delegate: HashMap<String, Int> = hashMapOf<String, Int>()
local get(): Int {
return getValue<Int, Int>($receiver = x$delegate, thisRef = null, property = ::x)
}
local set(value: Int) {
return setValue<Int>($receiver = x$delegate, thisRef = null, property = ::x, value = value)
}
<set-x>(value = 0)
{ //BLOCK
val tmp0: Int = <get-x>()
<set-x>(value = tmp0.inc())
tmp0
} /*~> Unit */
<set-x>(value = <get-x>().plus(other = 1))
}