Skip to content

Commit

Permalink
Prefer TypeBounds#isErroneous for lo eq hi check
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Dec 30, 2023
1 parent 4c2d5d8 commit bff12be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/reporting/Message.scala
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ object Message:
}

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

0 comments on commit bff12be

Please sign in to comment.