Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/passingLambdaToContextualParam.kt.txt
T
2024-02-16 10:19:38 +00:00

25 lines
410 B
Kotlin
Vendored

class C {
val result: String
field = "OK"
get
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun box(): String {
return contextual(f = local fun <anonymous>($context_receiver_0: C): String {
return $context_receiver_0.<get-result>()
}
)
}
fun contextual(f: @ContextFunctionTypeParams(count = 1) Function1<C, String>): String {
return f.invoke(p1 = C())
}