summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-25 20:23:32 +0000
committerPaul Phillips <paulp@improving.org>2009-09-25 20:23:32 +0000
commit9f5eff8768d4ad41ea37d71a73835206736ff6bc (patch)
treece33a32e63c9eaa58042d4221b9f59dc4365f562 /src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
parent15eb9333fa7fddc458f1c79da8ff1270ce990db2 (diff)
downloadscala-9f5eff8768d4ad41ea37d71a73835206736ff6bc.tar.gz
scala-9f5eff8768d4ad41ea37d71a73835206736ff6bc.tar.bz2
scala-9f5eff8768d4ad41ea37d71a73835206736ff6bc.zip
Short/Byte/Char/Int scrutinees will now be comp...
Short/Byte/Char/Int scrutinees will now be compiled into switches if all cases are literals. (There remain many things which can prevent switch creation.)
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Unapplies.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Unapplies.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
index 7944e940ef..b586298560 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
@@ -94,10 +94,10 @@ trait Unapplies extends ast.TreeDSL
}
def copyUntyped[T <: Tree](tree: T): T =
- applyAndReturn[T](UnTyper traverse _)(tree.duplicate)
+ returning[T](UnTyper traverse _)(tree.duplicate)
def copyUntypedInvariant(td: TypeDef): TypeDef =
- applyAndReturn[TypeDef](UnTyper traverse _)(
+ returning[TypeDef](UnTyper traverse _)(
treeCopy.TypeDef(td, td.mods &~ (COVARIANT | CONTRAVARIANT), td.name,
td.tparams, td.rhs).duplicate
)