7587f73846
Update tests for ^KT-61937 Merge-request: KT-MR-13678 Merged-by: Anzhela Sukhanova <anzhela.sukhanova@jetbrains.com>
18 lines
253 B
Kotlin
Vendored
18 lines
253 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// ISSUE: KT-61937
|
|
// !LANGUAGE: +ContextReceivers
|
|
|
|
class Ctx
|
|
|
|
context(Ctx)
|
|
fun Ctx.foo(): String = "NOK"
|
|
|
|
context(Ctx)
|
|
fun bar(foo: Ctx.() -> String ): String {
|
|
return foo()
|
|
}
|
|
|
|
fun box(): String = with (Ctx()) {
|
|
bar { "OK" }
|
|
}
|