Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt
T
2018-06-28 12:26:41 +02:00

19 lines
391 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
// Enable when callable references to builtin members and using lambdas as extension lambdas (KT-13312) is supported
// 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"
}