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

22 lines
266 B
Kotlin
Vendored

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