Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/lambdaReceiverFromContext.kt
T
anzhela.sukhanova 7587f73846 [Test] KT-61937: add tests with context functions and naming clash
Update tests for ^KT-61937


Merge-request: KT-MR-13678
Merged-by: Anzhela Sukhanova <anzhela.sukhanova@jetbrains.com>
2024-01-18 08:27:31 +00:00

20 lines
285 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!>()<!>
}
}
context(Ctx)
fun bar(body: Ctx.() -> Unit) {
foo()
body<!NO_VALUE_FOR_PARAMETER!>()<!>
}