18 lines
305 B
Kotlin
Vendored
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"
|
|
} |