FIR2IR: Fix case of using context receivers in property initializers
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
class Components(val x: String)
|
||||
|
||||
context(Components)
|
||||
abstract class A(val y: String) {
|
||||
val w: String = x
|
||||
fun foo(): String = w + y
|
||||
}
|
||||
|
||||
context(Components)
|
||||
class B(y: String) : A(y)
|
||||
|
||||
fun box(): String {
|
||||
return with(Components("O")) {
|
||||
B("K").foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user