mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 08:31:28 +00:00
IR expects overridden symbols of "invoke" in KFunction to be "invoke" in the corresponding Function classes. Before this commit we don't set overriddenSymbol, now we do.
17 lines
289 B
Kotlin
Vendored
17 lines
289 B
Kotlin
Vendored
fun run(arg1: A, arg2: String, funRef:A.(String) -> String): String {
|
|
return arg1.funRef(arg2)
|
|
}
|
|
|
|
class A
|
|
|
|
fun A.foo(result: String) = result
|
|
|
|
fun box(): String {
|
|
val x = A::foo
|
|
var r = x(A(), "OK")
|
|
if (r != "OK") return r
|
|
|
|
r = run(A(), "OK", A::foo)
|
|
return "OK"
|
|
}
|