summaryrefslogtreecommitdiff
path: root/Source/Core/StandardVisitor.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2015-01-09 15:57:10 +0100
committerGravatar wuestholz <unknown>2015-01-09 15:57:10 +0100
commit10e3dc7980ceaeb254d7ad94829fd2f2ebb2612c (patch)
treeaa8eee4713f41e20419d48727a5d7077741346bf /Source/Core/StandardVisitor.cs
parent7a1fdfc03d53699d50fd1cb562364b5a86039e41 (diff)
Made invariant of class 'Trigger' robust by:
- making field private - adding getter/setter - copying incoming list - exposing read-only list (with help from David Rohr)
Diffstat (limited to 'Source/Core/StandardVisitor.cs')
-rw-r--r--Source/Core/StandardVisitor.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/StandardVisitor.cs b/Source/Core/StandardVisitor.cs
index 68de45f6..abd106a5 100644
--- a/Source/Core/StandardVisitor.cs
+++ b/Source/Core/StandardVisitor.cs
@@ -523,11 +523,11 @@ namespace Microsoft.Boogie {
if (origNext != null) {
Trigger newNext = this.VisitTrigger(origNext);
if (newNext != origNext) {
- node = new Trigger(node.tok, node.Pos, node.Tr); // note: this creates sharing between the old and new Tr sequence
+ node = new Trigger(node.tok, node.Pos, node.Tr.ToList());
node.Next = newNext;
}
}
- node.Tr = this.VisitExprSeq(node.Tr);
+ node.Tr = this.VisitExprSeq(node.Tr.ToList());
return node;
}
// called by default for all nullary type constructors and type variables
@@ -1073,7 +1073,7 @@ namespace Microsoft.Boogie {
{
this.VisitTrigger(origNext);
}
- this.VisitExprSeq(node.Tr);
+ this.VisitExprSeq(node.Tr.ToList());
return node;
}
// called by default for all nullary type constructors and type variables