[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,80 @@
fun interface Fn<T : Any?, R : Any?> {
abstract fun run(s: String, i: Int, t: T): R
}
class J {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
fun runConversion(f1: Fn<String, Int>, f2: Fn<Int, String>): Int {
return f1.run(s = "Bar", i = 1, t = f2.run(s = "Foo", i = 42, t = 239))
}
}
val fsi: Fn<String, Int>
field = { //BLOCK
local class <no name provided> : Fn<String, Int> {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
override fun run(s: String, i: Int, t: String): Int {
return 1
}
}
TODO("IrConstructorCall")
}
get
val fis: Fn<Int, String>
field = { //BLOCK
local class <no name provided> : Fn<Int, String> {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
}
override fun run(s: String, i: Int, t: Int): String {
return ""
}
}
TODO("IrConstructorCall")
}
get
fun test(j: J) {
j.runConversion(f1 = <get-fsi>(), f2 = local fun <anonymous>(s: String, i: Int, ti: Int): String {
return ""
}
/*-> Fn<Int, String> */) /*~> Unit */
j.runConversion(f1 = local fun <anonymous>(s: String, i: Int, ts: String): Int {
return 1
}
/*-> Fn<String, Int> */, f2 = <get-fis>()) /*~> Unit */
}