K2: Update extension receiver after checking in CheckExtensionReceiver

fixes receiver selection when the candidate has more that one possible
extension receiver
#KT-62129 fixed
This commit is contained in:
Ilya Chernikov
2023-09-21 17:04:02 +02:00
committed by Space Team
parent 56eedfebee
commit 141333bdcd
9 changed files with 58 additions and 10 deletions
@@ -0,0 +1,12 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class A { val o = "O" }
class B { val k = "K" }
val A.bar get() = o
context(A, B)
fun ok() = bar + k
fun box(): String = with(A()) { with(B()) { ok() } }