Skip to content

Commit bff12be

Browse files
committed
Prefer TypeBounds#isErroneous for lo eq hi check
1 parent 4c2d5d8 commit bff12be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/reporting/Message.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ object Message:
145145
}
146146

147147
def addendum(cat: String, info: Type): String = info match {
148-
case bounds @ TypeBounds(lo, hi) if !(bounds =:= TypeBounds.empty) && !lo.isErroneous && !hi.isErroneous =>
148+
case bounds @ TypeBounds(lo, hi) if !(bounds =:= TypeBounds.empty) && !bounds.isErroneous =>
149149
if (lo eq hi) i" which is an alias of $lo"
150150
else i" with $cat ${boundsStr(bounds)}"
151151
case _ =>

0 commit comments

Comments
 (0)