Files
kotlin-fork/compiler/testData/codegen/bytecodeListing/contextReceivers/function.kt
T
2021-12-02 20:24:26 +03:00

19 lines
223 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM
class C {
val c = 42
}
context(C)
fun foo() {
c
}
fun bar(c: C) {
with(c) {
foo()
}
}