From 300992407ca0e03eeda93cbb1a34ebc5907586b5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 15 Dec 2015 14:01:15 +0100 Subject: [PATCH] Better error message in splitter --- src/dotty/tools/dotc/transform/Splitter.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dotty/tools/dotc/transform/Splitter.scala b/src/dotty/tools/dotc/transform/Splitter.scala index 62a080f37001..410b412e05d9 100644 --- a/src/dotty/tools/dotc/transform/Splitter.scala +++ b/src/dotty/tools/dotc/transform/Splitter.scala @@ -47,7 +47,10 @@ class Splitter extends MiniPhaseTransform { thisTransform => if (!mbr.isOverloaded) mbr.asSingleDenotation else tree.tpe match { case tref: TermRefWithSignature => mbr.atSignature(tref.sig) - case _ => ctx.error(s"cannot disambiguate overloaded member $mbr"); NoDenotation + case _ => + def alts = mbr.alternatives.map(alt => i"$alt: ${alt.info}").mkString(", ") + ctx.error(s"cannot disambiguate overloaded members $alts", tree.pos) + NoDenotation } }