Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/lambdaReceiverFromContext.kt
T
Ilya Chernikov 268d058bbb Implement missing invoke resolution branch with context receivers
#KT-61937 fixed
Note: the current implementation only resolves for a single receiver
in each group. See KT-62712 and KT-62709 for the followup.
2023-10-19 19:39:31 +00:00

14 lines
187 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
class Ctx
fun Ctx.foo() {}
context(Ctx)
class A {
fun bar(body: Ctx.() -> Unit) {
foo()
body<!NO_VALUE_FOR_PARAMETER!>()<!>
}
}