Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/withExplicitReceiver.kt
T
2022-04-06 16:05:41 +00:00

22 lines
250 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
open class A
class B
class C: A()
context(A)
fun B.f() {}
fun main() {
val b = B()
b.<!NO_CONTEXT_RECEIVER!>f<!>()
with(A()) {
b.f()
}
with(C()) {
b.f()
}
}