Files
kotlin-fork/compiler/testData/codegen/boxInline/noInline/withoutInline.kt
T
2018-06-28 12:26:41 +02:00

25 lines
379 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
class Inline {
inline fun calc(s: (Int) -> Int, p: Int) : Int {
return s(p)
}
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
fun test1(): Int {
val inlineX = Inline()
var p = { l : Int -> l};
return inlineX.calc(p, 25)
}
fun box(): String {
if (test1() != 25) return "test1: ${test1()}"
return "OK"
}