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
This commit is contained in:
+3
-9
@@ -17,9 +17,7 @@ open class Base {
|
||||
|
||||
class Test1 : Base {
|
||||
constructor(xx: Int, yy: Int) /* primary */ {
|
||||
{ // BLOCK
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
}
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
@@ -28,17 +26,13 @@ class Test1 : Base {
|
||||
|
||||
class Test2 : Base {
|
||||
constructor(xx: Int, yy: Int) {
|
||||
{ // BLOCK
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
}
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(xxx: Int, yyy: Int, a: Any) {
|
||||
{ // BLOCK
|
||||
this/*Test2*/(xx = xxx, yy = yyy)
|
||||
}
|
||||
this/*Test2*/(xx = xxx, yy = yyy)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user