From 8792dda476e33af1070b11f0af288897dff995ca Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 29 Apr 2011 15:35:37 +0000 Subject: Ignore type errors raised in later phases that ... Ignore type errors raised in later phases that are due to mismatching existentials. Quick fix to address lift build failures. Review by dragos. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index add3bca6f2..233caaca32 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -925,7 +925,18 @@ trait Typers extends Modes { log("error tree = "+tree) if (settings.explaintypes.value) explainTypes(tree.tpe, pt) } - typeErrorTree(tree, tree.tpe, pt) + try { + typeErrorTree(tree, tree.tpe, pt) + } catch { + case ex: TypeError => + if (phase.id > currentRun.typerPhase.id && + tree.tpe.isInstanceOf[ExistentialType] && + pt.isInstanceOf[ExistentialType]) + // ignore type errors raised in later phases that are due to mismatching existentials + tree + else + throw ex + } } } } -- cgit v1.2.3