diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-25 20:23:32 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-25 20:23:32 +0000 |
commit | 9f5eff8768d4ad41ea37d71a73835206736ff6bc (patch) | |
tree | ce33a32e63c9eaa58042d4221b9f59dc4365f562 /src/compiler/scala/tools/nsc/typechecker/Unapplies.scala | |
parent | 15eb9333fa7fddc458f1c79da8ff1270ce990db2 (diff) | |
download | scala-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.scala | 4 |
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 ) |