Skip to content

Commit 4c69e78

Browse files
committed
test mutation 3
1 parent a7ff9bc commit 4c69e78

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

test-out/epfl/test8-mutation3.check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
promoting to effect: Sym(7)=Reflect(ArrayLength(Sym(6)),Summary(false,false,false,false,false,false,List(Sym(6)),List(Sym(6)),List(),List()),List(Sym(6)))
1+
promoting to effect: Sym(7)=Reflect(ArrayLen(Sym(6)),Summary(false,false,false,false,false,false,List(Sym(6)),List(Sym(6)),List(),List()),List(Sym(6)))
22
depends on Sym(6)
33
error: illegal sharing of mutable objects Sym(6)
44
at Sym(13)=Reflect(Assign(Variable(Sym(3)),Sym(6)),Summary(false,false,false,false,false,false,List(Sym(3), Sym(6)),List(Sym(3), Sym(6)),List(Sym(3)),List(Sym(3))),List(Sym(10), Sym(12)))
@@ -8,18 +8,18 @@ at Sym(13)=Reflect(Assign(Variable(Sym(3)),Sym(6)),Summary(false,false,false,fal
88
class Test extends ((Int)=>(Unit)) {
99
def apply(x0:Int): Unit = {
1010
val x2 = LoopArray(100) { x1 =>
11-
0.0
11+
0
1212
}
13-
var x3: Array[Double] = x2
13+
var x3: Array[Int] = x2
1414
val x5 = LoopArray(100) { x4 =>
15-
0.0
15+
0
1616
}
1717
val x6 = x5.clone // mutable
1818
val x7 = x6.length
1919
var x9 : Int = 0
2020
val x15 = while (x9 < x7) {
2121
val x10 = x3
22-
val x12 = x6.update(x9, 8.0)
22+
val x12 = x6.update(x9, 8)
2323
x3 = x6
2424

2525
x9 = x9 + 1

test-out/epfl/test8-mutation3b.check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
promoting to effect: Sym(7)=Reflect(ArrayLength(Sym(6)),Summary(false,false,false,false,false,false,List(Sym(6)),List(Sym(6)),List(),List()),List(Sym(6)))
1+
promoting to effect: Sym(7)=Reflect(ArrayLen(Sym(6)),Summary(false,false,false,false,false,false,List(Sym(6)),List(Sym(6)),List(),List()),List(Sym(6)))
22
depends on Sym(6)
33
promoting to effect: Sym(13)=Reflect(ArrayClone(Sym(6)),Summary(false,false,false,false,false,false,List(Sym(6)),List(Sym(6)),List(),List()),List(Sym(12)))
44
depends on Sym(6)
@@ -8,18 +8,18 @@ depends on Sym(6)
88
class Test extends ((Int)=>(Unit)) {
99
def apply(x0:Int): Unit = {
1010
val x2 = LoopArray(100) { x1 =>
11-
0.0
11+
0
1212
}
13-
var x3: Array[Double] = x2
13+
var x3: Array[Int] = x2
1414
val x5 = LoopArray(100) { x4 =>
15-
0.0
15+
0
1616
}
1717
val x6 = x5.clone // mutable
1818
val x7 = x6.length
1919
var x9 : Int = 0
2020
val x16 = while (x9 < x7) {
2121
val x10 = x3
22-
val x12 = x6.update(x9, 8.0)
22+
val x12 = x6.update(x9, 8)
2323
val x13 = x6.clone
2424
x3 = x13
2525

0 commit comments

Comments
 (0)