20 lines
260 B
Kotlin
Vendored
20 lines
260 B
Kotlin
Vendored
// !LANGUAGE: +ContextReceivers
|
|
// TARGET_BACKEND: JVM_IR
|
|
|
|
fun box(): String {
|
|
with(A()) {
|
|
object : B(){
|
|
init {
|
|
foo()
|
|
}
|
|
}
|
|
}
|
|
return "OK"
|
|
}
|
|
|
|
class A {
|
|
fun foo() {}
|
|
}
|
|
|
|
context(A)
|
|
open class B |