Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/function.kt
T
2023-03-22 15:18:17 +00:00

20 lines
216 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +ContextReceivers
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
class C {
val c = 42
}
context(C)
fun foo() {
c
}
fun bar(c: C) {
with(c) {
foo()
}
}