Files
kotlin/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt
2018-12-20 12:53:22 +01:00

18 lines
331 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
// SKIP_INLINE_CHECK_IN: inlineFun$default
package test
inline fun inlineFun(a: Int, lambda: (Int) -> Int = 1::plus): Int {
return lambda(a)
}
// FILE: 2.kt
import test.*
fun box(): String {
val result = inlineFun(2)
return if (result == 3) return "OK" else "fail $result"
}