From da945c4613cb9a11c89649aeabf1913e3b3019dd Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 22 Oct 2015 17:11:04 +0200 Subject: Better handling of merge errors Instead of picking one at random, throw a MergeError which might be caught later in mergeDenot. MergeDenot has enough info to pick a simulate Scala2 linarization if the prefix comes from Scala2, or it rethrows the exception so that it becomes a type error. --- src/dotty/tools/dotc/core/Types.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e4f228915..58a6d226d 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -492,10 +492,8 @@ object Types { try go(this) catch { - case ex: MergeError => - throw new MergeError(s"${ex.getMessage} as members of type ${pre.show}") case ex: Throwable => - ctx.println(i"findMember exception for $this member $name") + core.println(i"findMember exception for $this member $name") throw ex // DEBUG } finally { -- cgit v1.2.3