Files
kotlin-fork/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt.txt
T
pyos 3dc7b6c3ee IR: preserve argument evaluation order more carefully
1. receivers should be evaluated before named arguments;
 2. just because an argument has no side effects doesn't mean it is not
    affected by the other arguments' side effects - in that case it
    should still be evaluated in source order.

 #KT-47660 Fixed
2021-07-13 21:23:15 +03:00

40 lines
518 B
Plaintext
Vendored

open class Base {
constructor(x: Int, y: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
val y: Int
field = y
get
}
class Test1 : Base {
constructor(xx: Int, yy: Int) /* primary */ {
super/*Base*/(x = xx, y = yy)
/* <init>() */
}
}
class Test2 : Base {
constructor(xx: Int, yy: Int) {
super/*Base*/(x = xx, y = yy)
/* <init>() */
}
constructor(xxx: Int, yyy: Int, a: Any) {
this/*Test2*/(xx = xxx, yy = yyy)
}
}