Skip to content

Commit 9f130e0

Browse files
committed
test mutation 1
1 parent 7f0fb85 commit 9f130e0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test-out/epfl/test8-mutation1.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: write to non-mutable Sym(8) -> Some(TP(Sym(8),IfThenElse(Sym(7),Block(Sym(3)),Block(Sym(6)))))
2-
at Sym(9)=Reflect(ArrayUpdate(Sym(8),Const(40),Const(40.0)),Summary(false,false,false,false,false,false,List(Sym(3), Sym(6)),List(Sym(3), Sym(6)),List(Sym(8)),List(Sym(8))),List(Sym(3), Sym(6)))
2+
at Sym(9)=Reflect(ArrayUpdate(Sym(8),Const(40),Const(40)),Summary(false,false,false,false,false,false,List(Sym(3), Sym(6)),List(Sym(3), Sym(6)),List(Sym(8)),List(Sym(8))),List(Sym(3), Sym(6)))
33
promoting to effect: Sym(10)=Reflect(ArrayIndex(Sym(8),Const(50)),Summary(false,false,false,false,false,false,List(Sym(3), Sym(6)),List(Sym(3), Sym(6)),List(),List()),List(Sym(3), Sym(6)))
44
depends on Sym(3)
55
depends on Sym(6)
@@ -9,11 +9,11 @@ depends on Sym(6)
99
class Test extends ((Int)=>(Unit)) {
1010
def apply(x0:Int): Unit = {
1111
val x2 = LoopArray(100) { x1 =>
12-
0.0
12+
0
1313
}
1414
val x3 = x2.clone // mutable
1515
val x5 = LoopArray(100) { x4 =>
16-
0.0
16+
0
1717
}
1818
val x6 = x5.clone // mutable
1919
val x7 = x0 > 7
@@ -22,7 +22,7 @@ x3
2222
} else {
2323
x6
2424
}
25-
val x9 = x8.update(40, 40.0)
25+
val x9 = x8.update(40, 40)
2626
val x10 = x8.apply(50)
2727
val x11 = println(x10)
2828
x11

test-out/epfl/test8-mutation1b.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ depends on Sym(9)
66
class Test extends ((Int)=>(Unit)) {
77
def apply(x0:Int): Unit = {
88
val x2 = LoopArray(100) { x1 =>
9-
0.0
9+
0
1010
}
1111
val x3 = x2.clone // mutable
1212
val x5 = LoopArray(100) { x4 =>
13-
0.0
13+
0
1414
}
1515
val x6 = x5.clone // mutable
1616
val x7 = x0 > 7
@@ -20,7 +20,7 @@ x3
2020
x6
2121
}
2222
val x9 = x8.clone // mutable
23-
val x10 = x9.update(40, 40.0)
23+
val x10 = x9.update(40, 40)
2424
val x11 = x9.apply(50)
2525
val x12 = println(x11)
2626
x12

0 commit comments

Comments
 (0)