aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-10-22 17:11:04 +0200
committerMartin Odersky <odersky@gmail.com>2015-10-22 17:11:04 +0200
commitda945c4613cb9a11c89649aeabf1913e3b3019dd (patch)
tree63923ddca849eee1d8ee95140da531004910dd6c /src/dotty/tools/dotc/core/Types.scala
parent746889b4ed0f53e433c123ddb2b90dece1298fff (diff)
downloaddotty-da945c4613cb9a11c89649aeabf1913e3b3019dd.tar.gz
dotty-da945c4613cb9a11c89649aeabf1913e3b3019dd.tar.bz2
dotty-da945c4613cb9a11c89649aeabf1913e3b3019dd.zip
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.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala4
1 files changed, 1 insertions, 3 deletions
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 {