9ec2411218
^KT-51889 Fixed
19 lines
277 B
Kotlin
Vendored
19 lines
277 B
Kotlin
Vendored
// !LANGUAGE: +ContextReceivers
|
|
// TARGET_BACKEND: JVM_IR
|
|
|
|
class Components(val x: String)
|
|
|
|
context(Components)
|
|
abstract class A {
|
|
fun foo(): String = x
|
|
}
|
|
|
|
context(Components)
|
|
class B : A()
|
|
|
|
fun box(): String {
|
|
return with(Components("OK")) {
|
|
B().foo()
|
|
}
|
|
}
|