Files
kotlin/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt
pyos 7ff700ff97 JVM_IR: lower calls to @JvmStatic functions from other files.
Note: this currently results in invalid IR (but valid bytecode) if the
@JvmStatic function is imported, because its IR representation is
unlowered and therefore has a dispatch receiver, but the call will not.
2019-08-20 11:39:25 +03:00

21 lines
349 B
Kotlin
Vendored

// FILE: 1.kt
// SKIP_INLINE_CHECK_IN: inlineFun$default
// TARGET_BACKEND: JVM
//WITH_RUNTIME
package test
object X {
@JvmStatic
inline fun inlineFun(capturedParam: String, lambda: () -> String = { capturedParam }): String {
return lambda()
}
}
// FILE: 2.kt
import test.*
fun box(): String {
return X.inlineFun("OK")
}