Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/jvmStatic.kt
T
2021-05-19 16:23:01 +03:00

15 lines
308 B
Kotlin
Vendored

// WITH_RUNTIME
// TARGET_BACKEND: JVM
object Test {
@JvmStatic
fun foo(x: String, y: String = "") = x + value
var value = ""
}
fun callFoo(f: (String) -> String, value: String) = f(value)
fun test() = Test.apply { value = "K" }
fun box() = callFoo(Test::foo, "O") + callFoo(test()::foo, "")