Files
kotlin-fork/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt
T
2021-02-02 17:53:52 +03:00

21 lines
330 B
Kotlin
Vendored

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