JVM: fix inlining of default lambdas of signature (Result) -> Any
They have no `invoke` bridge, and the overridden invoke expectes a boxed `Result` as an argument.
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
// IGNORE_BACKEND: JS
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun <T> inlineFun(v: T, x: (Result<T>) -> T = { it.getOrNull()!! }) =
|
||||
x(Result.success(v))
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box() = inlineFun("OK")
|
||||
Reference in New Issue
Block a user