Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt
T
2016-11-28 16:33:58 +03:00

18 lines
362 B
Kotlin
Vendored

// Enable when callable references to builtin members and using lambdas as extension lambdas (KT-13312) is supported
// IGNORE_BACKEND: JS
// FILE: 1.kt
package test
inline fun call(p: String, s: String.() -> Int): Int {
return p.s()
}
// FILE: 2.kt
import test.*
fun box() : String {
return if (call("123", String::length) == 3) "OK" else "fail"
}