Files
kotlin-fork/compiler/testData/codegen/box/fir/contextReceiverToExtensionReceiver.kt
T
2023-11-14 13:33:18 +00:00

22 lines
286 B
Kotlin
Vendored

// LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-54139
class A
class B
fun B.extensionFunction() {}
context(A, B)
fun test() {
extensionFunction()
}
fun box(): String {
with(A()) {
with(B()) {
test()
}
}
return "OK"
}