Skip to content

Commit 6364702

Browse files
committed
Replace plus-assign
Currently, ArkIR for field-plus-assign is broken
1 parent e326d19 commit 6364702

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

usvm-ts/src/test/resources/reachability/ComplexReachability.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Calculator {
172172
}
173173

174174
add(val: number): void {
175-
this.currentValue += val;
175+
this.currentValue = this.currentValue + val;
176176
}
177177
}
178178

usvm-ts/src/test/resources/reachability/FunctionCallReachability.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ class FunctionCallReachability {
136136
}
137137

138138
incrementCounter(counter: Counter, amount: number): void {
139-
counter.value += amount;
139+
counter.value = counter.value + amount;
140140
}
141141

142142
crossIncrement(obj1: SimpleCounter, obj2: SimpleCounter, amount: number): void {
143-
obj1.count += amount;
144-
obj2.count += amount;
143+
obj1.count = obj1.count + amount;
144+
obj2.count = obj2.count + amount;
145145
}
146146

147147
calculateSum(arr: number[]): number {

0 commit comments

Comments
 (0)