diff options
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 4c55b9d4f..b3511841d 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1117,9 +1117,10 @@ class Typer extends Namer with Applications with Implicits { noMatches } case alts => - def all = if (altDenots.length == 2) "both" else "all" + val remainingDenots = alts map (_.denot.asInstanceOf[SingleDenotation]) + def all = if (remainingDenots.length == 2) "both" else "all" errorTree(tree, - i"""Ambiguous overload. The ${err.overloadedAltsStr(altDenots)} + i"""Ambiguous overload. The ${err.overloadedAltsStr(remainingDenots)} |$all match $expectedStr""".stripMargin) } } |