Files
kotlin/compiler/testData/codegen/bytecodeText/callableReference/inline.kt
Alexander Udalov 938fd1a57e Use ResolvedCall for callable reference in KCallableNameProperty intrinsic
Instead of manually inspecting the DOUBLE_COLON_LHS slice, which is a
bit more error-prone. Note that new tests were passing before this
change
2017-11-27 12:46:56 +01:00

13 lines
197 B
Kotlin
Vendored

fun box(): String {
return if (call(10, ::calc) == 5) "OK" else "fail"
}
fun calc(p: Int): Int {
return p / 2
}
inline fun call(p: Int, s: (Int) -> Int): Int {
return s(p)
}
// 0 NEW