summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scalac/ast/TreeList.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/scalac/ast/TreeList.java b/sources/scalac/ast/TreeList.java
index 3557c20e9c..bf4550c632 100644
--- a/sources/scalac/ast/TreeList.java
+++ b/sources/scalac/ast/TreeList.java
@@ -22,8 +22,7 @@ public final class TreeList {
}
public TreeList() {
- this(new Tree[4]);
- len = 0;
+ clear();
}
public void append(Tree tree) {
@@ -45,6 +44,11 @@ public final class TreeList {
append(tl.trees[j]);
}
+ public void clear() {
+ trees = new Tree[4];
+ len = 0;
+ }
+
public int length() {
return len;
}