Files
kotlin/compiler/testData/codegen/boxInline/callableReference/constructor.kt
2018-06-28 12:26:41 +02:00

22 lines
292 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
package test
class A(val z: Int) {
fun calc() = z
}
inline fun call(p: Int, s: (Int) -> A): Int {
return s(p).z
}
// FILE: 2.kt
import test.*
fun box() : String {
val call = call(11, ::A)
return if (call == 11) "OK" else "fail"
}