Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt
T
2018-08-09 14:22:50 +03:00

17 lines
270 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// 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"
}