Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt
T
2021-02-02 17:53:52 +03:00

20 lines
271 B
Kotlin
Vendored

// FILE: 1.kt
package test
inline fun <R> map(transform: () -> R): R {
return transform()
}
// FILE: 2.kt
import test.*
val Int.myInc
get() = this + 1
fun box(): String {
val result = map(2::myInc)
return if (result == 3) "OK" else "fail $result"
}