summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-12-17 18:17:10 +0000
committerMartin Odersky <odersky@gmail.com>2009-12-17 18:17:10 +0000
commit3b620e31d3ad51df46c99ca02347ca292097278e (patch)
tree77ce0bd44fa62dc99cb7117ab5946b2266159c74 /src/compiler
parentd5f0ed310e475718492e34778d6b2a7b50f67669 (diff)
downloadscala-3b620e31d3ad51df46c99ca02347ca292097278e.tar.gz
scala-3b620e31d3ad51df46c99ca02347ca292097278e.tar.bz2
scala-3b620e31d3ad51df46c99ca02347ca292097278e.zip
Closed #2775. Review by moors.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index e4ee0afb28..9db88af6c6 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -39,7 +39,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast.
/** Is `tp` an unbounded generic type (i.e. which could be instantiated
* with primitive as well as class types)?.
*/
- private def genericCore(tp: Type): Type = tp match {
+ private def genericCore(tp: Type): Type = tp.normalize match {
case TypeRef(_, argsym, _) if (argsym.isAbstractType && !(argsym.owner hasFlag JAVA)) =>
tp
case ExistentialType(tparams, restp) =>
@@ -52,7 +52,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast.
* then Some(N, T) where N is the number of Array constructors enclosing `T`,
* otherwise None. Existentials on any level are ignored.
*/
- def unapply(tp: Type): Option[(Int, Type)] = tp match {
+ def unapply(tp: Type): Option[(Int, Type)] = tp.normalize match {
case TypeRef(_, ArrayClass, List(arg)) =>
genericCore(arg) match {
case NoType =>