summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-10-12 10:57:15 +0000
committerMartin Odersky <odersky@gmail.com>2009-10-12 10:57:15 +0000
commit5d61522281b785ba53c34fe38fe6e1ce59bcfac9 (patch)
treee0ccda2a8a7fe62ce4a2e2657dac9931d534eaec /src/compiler
parentbf02e46f2ae1fde75f28da909b8a6e23383cec9b (diff)
downloadscala-5d61522281b785ba53c34fe38fe6e1ce59bcfac9.tar.gz
scala-5d61522281b785ba53c34fe38fe6e1ce59bcfac9.tar.bz2
scala-5d61522281b785ba53c34fe38fe6e1ce59bcfac9.zip
Fixed #2444
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 6b3d24ffa2..1c6c04b2bc 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -2329,11 +2329,20 @@ A type's typeSymbol should never be inspected directly.
tp1
}
}
+ override def mapOver(tp: Type): Type = tp match {
+ case SingleType(pre, sym) =>
+ if (sym.isPackageClass) tp // short path
+ else {
+ val pre1 = this(pre)
+ if ((pre1 eq pre) || !pre1.isStable) tp
+ else singleType(pre1, sym)
+ }
+ case _ => super.mapOver(tp)
+ }
+
override def mapOver(tree: Tree) =
tree match {
- case tree:Ident
- if tree.tpe.isStable
- =>
+ case tree:Ident if tree.tpe.isStable =>
// Do not discard the types of existential ident's.
// The symbol of the Ident itself cannot be listed
// in the existential's parameters, so the
@@ -2343,9 +2352,6 @@ A type's typeSymbol should never be inspected directly.
case _ =>
super.mapOver(tree)
}
-
-
-
}
val tpe1 = extrapolate(tpe)
var tparams0 = tparams