summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-07-02 09:55:48 +0000
committerMartin Odersky <odersky@gmail.com>2007-07-02 09:55:48 +0000
commitd618e1f8981c8bda8dcc991057aa023f0160a009 (patch)
tree277c2f32f9a11ba4a00410ee7ba13fca30ed86ad
parent665a2748f0c2480b470eb9f938d48232b2af1097 (diff)
downloadscala-d618e1f8981c8bda8dcc991057aa023f0160a009.tar.gz
scala-d618e1f8981c8bda8dcc991057aa023f0160a009.tar.bz2
scala-d618e1f8981c8bda8dcc991057aa023f0160a009.zip
fixed bug1189
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 27e358ed77..cd668cd201 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2754,10 +2754,12 @@ trait Typers { self: Analyzer =>
if (tree.hasSymbol) tree.symbol = NoSymbol
}
//Console.println("typing "+tree+", "+context.undetparams);//DEBUG
- def dropExistential(tp: Type) = tp match {
+ def dropExistential(tp: Type): Type = tp match {
case ExistentialType(tparams, tpe) =>
if (settings.debug.value) println("drop ex "+tree+" "+tp)
tpe.subst(tparams, tparams map (x => WildcardType))
+ case TypeRef(_, sym, _)if sym.isAliasType =>
+ dropExistential(tp.normalize)
case _ => tp
}
var tree1 = if (tree.tpe ne null) tree else typed1(tree, mode, dropExistential(pt))