[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,35 @@
fun String.k(): Function0<String> {
return local fun <anonymous>(): String {
return <this>
}
}
fun test1(f: Function0<Unit>) {
return f.invoke()
}
fun test2(f: @ExtensionFunctionType Function1<String, Unit>) {
return f.invoke(p1 = "hello")
}
fun test3(): String {
return k($receiver = "hello").invoke()
}
fun test4(ns: String?): String? {
return { //BLOCK
val tmp1_safe_receiver: Function0<String>? = { //BLOCK
val tmp0_safe_receiver: String? = ns
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
true -> k($receiver = tmp0_safe_receiver)
}
}
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
true -> tmp1_safe_receiver.invoke()
}
}
}