blob: b44c298c75015c27ba89c0315d7544a5e7f9ee48 [file]
// IGNORE_BACKEND: JVM_IR, JVM_IR_SERIALIZE
// ^^^ Local inline functions are not yet supported.
// FILE: lib.kt
package foo
fun multiplyBy(x: Int): () -> ((Int) -> Int) {
inline fun applyMultiplication(y: Int): Int = x * y
return { ::applyMultiplication }
}
// FILE: main.kt
package foo
import kotlin.test.*
fun box(): String {
assertEquals(6, multiplyBy(2)()(3))
return "OK"
}