Skip to content

Commit

Permalink
Backport "Properly identify empty bounds in error message" to LTS (#2…
Browse files Browse the repository at this point in the history
…0806)

Backports #19310 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Jun 26, 2024
2 parents 1e6350f + 43e0f22 commit ab88fbf
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 @@ -125,7 +125,7 @@ object Message:
}

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

0 comments on commit ab88fbf

Please sign in to comment.