summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-25 15:26:09 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-25 15:26:09 +0000
commit28d3e984f7a78a754d0b815ab1c41b2639ec4457 (patch)
tree822472d3e5bdf5ced99e7e47ee08666b81415e77 /sources
parentc9bb06052e25d574446a4ded49d7bb9ed6d0f694 (diff)
downloadscala-28d3e984f7a78a754d0b815ab1c41b2639ec4457.tar.gz
scala-28d3e984f7a78a754d0b815ab1c41b2639ec4457.tar.bz2
scala-28d3e984f7a78a754d0b815ab1c41b2639ec4457.zip
- Removed useless asInstanceOf
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/scalac/ast/TreeList.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/sources/scala/tools/scalac/ast/TreeList.scala b/sources/scala/tools/scalac/ast/TreeList.scala
index 0398ff50a7..1fda8b49b6 100644
--- a/sources/scala/tools/scalac/ast/TreeList.scala
+++ b/sources/scala/tools/scalac/ast/TreeList.scala
@@ -24,8 +24,7 @@ final class TreeList(ts: Array[Tree]) {
def append(tree: Tree): TreeList = {
if (len == trees.length) {
val ts = new Array[Tree](if (len == 0) 4 else len * 2);
- System.arraycopy(trees.asInstanceOf[Array[Object]], 0,
- ts.asInstanceOf[Array[Object]], 0, len);
+ System.arraycopy(trees, 0, ts, 0, len);
trees = ts;
}
trees(len) = tree;
@@ -61,16 +60,14 @@ final class TreeList(ts: Array[Tree]) {
def toArray(): Array[Tree] = {
val ts = new Array[Tree](len);
- System.arraycopy(trees.asInstanceOf[Array[Object]], 0,
- ts.asInstanceOf[Array[Object]], 0, len);
+ System.arraycopy(trees, 0, ts, 0, len);
ts
}
def copyTo[t <: Tree](ts: Array[t]): Array[t] = copyTo(ts, 0);
def copyTo[t <: Tree](ts: Array[t], from: int): Array[t] = {
- System.arraycopy(trees.asInstanceOf[Array[java.lang.Object]], 0,
- ts.asInstanceOf[Array[java.lang.Object]], from, len);
+ System.arraycopy(trees, 0, ts, from, len);
ts;
}
}