Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt
T
Roman Artemev fb499def59 Update tests
2018-10-25 15:49:21 +03:00

16 lines
245 B
Kotlin
Vendored

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