[FIR] Capture array and indices for postfix/prefix increment/decrement
of array element (including overloaded indexed access operators, e.g., `a[b, c]++`). This prevents double-evaluation of the array and indices expressions, which may have side-effects.
This commit is contained in:
committed by
teamcityserver
parent
eb631bc429
commit
a2a4d94834
+4
-4
@@ -18,8 +18,8 @@ object MismatchingTypes {
|
||||
}
|
||||
|
||||
fun testMismatchingTypes() {
|
||||
<!INAPPLICABLE_CANDIDATE!>++MismatchingTypes[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]++<!>
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingTypes[0]<!>++
|
||||
MismatchingTypes[0] += 1
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ object MismatchingArities2 {
|
||||
}
|
||||
|
||||
fun testMismatchingArities() {
|
||||
<!INAPPLICABLE_CANDIDATE!>++MismatchingArities1[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]++<!>
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>MismatchingArities1[0]<!>++
|
||||
MismatchingArities1[0] += 1
|
||||
|
||||
++<!INAPPLICABLE_CANDIDATE!>MismatchingArities2[0]<!>
|
||||
|
||||
Reference in New Issue
Block a user