summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 9f10ab994b..156f79617e 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -1206,7 +1206,7 @@ A type's symbol should never be inspected directly.
else if (isHigherKinded)
PolyType(typeParams, transform(sym.info.resultType).normalize)
else {
- log("Error: normalizing "+sym.rawname+" with mismatch between type params "+sym.info.typeParams+" and args "+args)
+ //log("Error: normalizing "+sym.rawname+" with mismatch between type params "+sym.info.typeParams+" and args "+args)
//this
transform(sym.info.resultType).normalize // technically wrong, but returning `this' is even worse (cycle!)
// only happens when compiling `val x: Class' with -Xgenerics,
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 0cee1b1bba..39f8893fbd 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -860,9 +860,11 @@ trait Infer {
}
/** Type with all top-level occurrences of abstract types replaced by their bounds */
- def widen(tp: Type): Type = tp.normalize match {
- case TypeRef(pre, sym, _) if sym.isAbstractType =>
+ def widen(tp: Type): Type = tp match { // @M don't normalize here (compiler loops on pos/bug1090.scala )
+ case TypeRef(_, sym, _) if sym.isAbstractType =>
widen(tp.bounds.hi)
+ case TypeRef(_, sym, _) if sym.isAliasType =>
+ widen(tp.normalize)
case rtp @ RefinedType(parents, decls) =>
copyRefinedType(rtp, List.mapConserve(parents)(widen), decls)
case _ =>