blob: 3c3d5f197d5c17e1ede5e97051232e106a9821bd [file]
// IGNORE_BACKEND: JVM
// ^^^ 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"
}