JVM_IR: fix copying of receivers when unboxing inline class parameters

If an extension receiver is copied into a normal parameter, this may
later cause default argument masks to be shifted.
This commit is contained in:
pyos
2020-09-29 11:59:25 +02:00
committed by Alexander Udalov
parent adcbfc7b4c
commit 1190457759
7 changed files with 64 additions and 33 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: +InlineClasses
// FILE: A.kt
package z
inline class Z(val s: String)
class X {
fun Int.foo(z: Z, value: String = "OK") = value
}
// FILE: B.kt
import z.*
fun box(): String = with(X()) { 1.foo(Z("")) }