diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-17 10:34:10 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-17 10:34:10 +0000 |
commit | b142c4376d0719f67f1c4a609564a89936474d10 (patch) | |
tree | 85a2792c2734619e194fa1a7a108acc9cd921da0 /src/compiler | |
parent | 86a6c4afff495e0c87e23861f55c8672e6c70d1b (diff) | |
download | scala-b142c4376d0719f67f1c4a609564a89936474d10.tar.gz scala-b142c4376d0719f67f1c4a609564a89936474d10.tar.bz2 scala-b142c4376d0719f67f1c4a609564a89936474d10.zip |
Fixed bug 627
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 087f1a4d98..7c4b797a08 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -577,7 +577,13 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer { unit.warning(tree.pos, "System.arraycopy should be applied only to arrays with fixed element types;\n" + "use Array.copy instead") - tree + if (fn.symbol == Any_asInstanceOf || fn.symbol == Any_asInstanceOfErased) + fn match { + case TypeApply(Select(qual, _), List(targ)) => + if (qual.tpe <:< targ.tpe) Typed(qual, TypeTree(qual.tpe)) + else tree + } + else tree case Template(parents, body) => assert(!currentOwner.isImplClass); |