Skip to content

Commit b32b45c

Browse files
committed
Account for PolyProto and IgnoredProto types in expectedTypeStr
1 parent fd6ac0a commit b32b45c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dotty/tools/dotc/typer/ErrorReporting.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ object ErrorReporting {
5656
else ""
5757

5858
def expectedTypeStr(tp: Type): String = tp match {
59+
case tp: PolyProto =>
60+
d"type arguments [${tp.targs}%, %] and ${expectedTypeStr(tp.resultType)}"
5961
case tp: FunProto =>
6062
val result = tp.resultType match {
61-
case tp: WildcardType => ""
62-
case tp => d"and expected result type $tp"
63+
case _: WildcardType | _: IgnoredProto => ""
64+
case tp => d" and expected result type $tp"
6365
}
6466
d"arguments (${tp.typedArgs.tpes}%, %)$result"
6567
case _ =>

0 commit comments

Comments
 (0)