Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt52373.kt
T

18 lines
305 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class Context
class Extended
class Containing {
context(Context) fun Extended.foo(obj: Any? = null) {}
}
fun box(): String {
with (Containing()) {
with (Context()) {
Extended().foo()
}
}
return "OK"
}