summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/Erasure.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-06-26 13:35:55 +0000
committerPaul Phillips <paulp@improving.org>2009-06-26 13:35:55 +0000
commit2f085cf0d2c4bfd22810568898394aac327a5b98 (patch)
treeb7b9a32ba3d40ff566c7ac12f9c05fe7e10077c1 /src/compiler/scala/tools/nsc/transform/Erasure.scala
parent26adfa06101a0744c235cdab0cc67a133e9978ab (diff)
downloadscala-2f085cf0d2c4bfd22810568898394aac327a5b98.tar.gz
scala-2f085cf0d2c4bfd22810568898394aac327a5b98.tar.bz2
scala-2f085cf0d2c4bfd22810568898394aac327a5b98.zip
Removed unused Any_asInstanceOfErased and Any_i...
Removed unused Any_asInstanceOfErased and Any_isInstanceOfErased variations on is/as.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/Erasure.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 84b5e14298..188bab5810 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -615,8 +615,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer {
atPos(tree.pos) {
Typed(Apply(translated, args), tpt)
}
- case Apply(TypeApply(sel @ Select(qual, name), List(targ)), List())
- if ((tree.symbol == Any_asInstanceOf || tree.symbol == Any_asInstanceOfErased)) =>
+ case Apply(TypeApply(sel @ Select(qual, name), List(targ)), List()) if tree.symbol == Any_asInstanceOf =>
val qual1 = typedQualifier(qual)
val qualClass = qual1.tpe.typeSymbol
val targClass = targ.tpe.typeSymbol
@@ -636,9 +635,9 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer {
case Select(qual, name) if (name != nme.CONSTRUCTOR) =>
if (tree.symbol == NoSymbol)
tree
- else if (tree.symbol == Any_asInstanceOf || tree.symbol == Any_asInstanceOfErased)
+ else if (tree.symbol == Any_asInstanceOf)
adaptMember(atPos(tree.pos)(Select(qual, Object_asInstanceOf)))
- else if (tree.symbol == Any_isInstanceOf || tree.symbol == Any_isInstanceOfErased)
+ else if (tree.symbol == Any_isInstanceOf)
adaptMember(atPos(tree.pos)(Select(qual, Object_isInstanceOf)))
else if (tree.symbol.owner == AnyClass)
adaptMember(atPos(tree.pos)(Select(qual, getMember(ObjectClass, name))))
@@ -982,7 +981,7 @@ 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")
- if (fn.symbol == Any_asInstanceOf || fn.symbol == Any_asInstanceOfErased)
+ if (fn.symbol == Any_asInstanceOf)
fn match {
case TypeApply(Select(qual, _), List(targ)) =>
if (qual.tpe <:< targ.tpe) {
@@ -997,9 +996,8 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer {
} else
tree
}
- // todo: get rid of instanceOfErased
// todo: also handle the case where the singleton type is buried in a compound
- else if (fn.symbol == Any_isInstanceOf || fn.symbol == Any_isInstanceOfErased)
+ else if (fn.symbol == Any_isInstanceOf)
fn match {
case TypeApply(sel @ Select(qual, name), List(targ)) =>
def mkIsInstanceOf(q: () => Tree)(tp: Type): Tree =