JVM IR: Avoid direct lambda invokes in inline tests

This commit is contained in:
Steven Schäfer
2022-06-13 15:13:04 +02:00
committed by Alexander Udalov
parent f0760e0550
commit 2acfb3a41f
117 changed files with 211 additions and 210 deletions
@@ -9,7 +9,7 @@ class A {
f()
s
v = "OK"
} ()
}.let { it() }
}
inline fun g2(crossinline f: () -> Unit) {
@@ -19,7 +19,7 @@ class A {
s
v = "OK"
}
}.run ()
}.run()
}
inline fun use() {
@@ -1,7 +1,7 @@
inline fun test(crossinline l: () -> String) {
{
l()
}()
}.let { it() }
object {
val z = l() //constuctor
+2 -2
View File
@@ -11,8 +11,8 @@ inline fun test(crossinline s: () -> Unit) {
{
{
s()
}()
}()
}.let { it() }
}.let { it() }
}
// 3 INNERCLASS Kt10259_2Kt\$test\$1 null
+2 -2
View File
@@ -15,8 +15,8 @@ inline fun test(crossinline s: () -> Unit) {
{
{
s()
}()
}()
}.let { it() }
}.let { it() }
}
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$1\s