Skip to content

Commit 43e0f22

Browse files
committed
Properly identify empty bounds in error message
This caused a trailing space which can easily misbehave in checkfiles. [Cherry-picked 63bf7f3][modified]
1 parent c32f5a9 commit 43e0f22

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)