Files
kotlin-fork/compiler/testData/codegen/box/extensionClasses/multiple.kt
T

20 lines
292 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class A(val a: String)
class B(val b: String)
context(A, B)
class C {
fun foo() = this@A.a + this@B.b
}
fun box(): String {
val c = with(A("O")) {
with(B("K")) {
C()
}
}
return c.foo()
}