Skip to content

Commit ab88fbf

Browse files
Backport "Properly identify empty bounds in error message" to LTS (#20806)
Backports #19310 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 1e6350f + 43e0f22 commit ab88fbf

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
@@ -125,7 +125,7 @@ object Message:
125125
}
126126

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

0 commit comments

Comments
 (0)