From 3f542aabf7944cc36302753d6126bb06e571d218 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 21 Sep 2014 14:50:45 +0200 Subject: Account for PolyProto and IgnoredProto types in expectedTypeStr --- src/dotty/tools/dotc/typer/ErrorReporting.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/typer/ErrorReporting.scala b/src/dotty/tools/dotc/typer/ErrorReporting.scala index 1f55df2bc..e96e04b1a 100644 --- a/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -56,10 +56,12 @@ object ErrorReporting { else "" def expectedTypeStr(tp: Type): String = tp match { + case tp: PolyProto => + d"type arguments [${tp.targs}%, %] and ${expectedTypeStr(tp.resultType)}" case tp: FunProto => val result = tp.resultType match { - case tp: WildcardType => "" - case tp => d"and expected result type $tp" + case _: WildcardType | _: IgnoredProto => "" + case tp => d" and expected result type $tp" } d"arguments (${tp.typedArgs.tpes}%, %)$result" case _ => -- cgit v1.2.3