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
@@ -4,7 +4,7 @@
package test
inline fun call(crossinline s: () -> String): String {
return { s() } ()
return { s() }.let { it() }
}
// FILE: 2.kt
@@ -6,7 +6,7 @@ package test
inline fun call(crossinline s: () -> String): String {
return {
s()
}()
}.let { it() }
}
// FILE: 2.kt
@@ -2,7 +2,7 @@
package test
// Argument `f` of `call$default` is technically nullable and inline.
inline fun call(other: Int = 1, crossinline f: () -> String = { "fail" }) = { f() }()
inline fun call(other: Int = 1, crossinline f: () -> String = { "fail" }) = { f() }.let { it() }
// FILE: 2.kt
import test.*
@@ -6,7 +6,7 @@ package test
inline fun call(crossinline s: () -> String): String {
return {
s()
}()
}.let { it() }
}
open class Base {