Files
kotlin/compiler/testData/codegen/bytecodeText/callableReference/boundPropertyReferenceInInline.kt
2019-06-04 14:56:13 +02:00

15 lines
219 B
Kotlin
Vendored

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