Skip to content

Commit 768dba2

Browse files
committed
Don't elide capture sets when printing (empty) bounds
1 parent c90f003 commit 768dba2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
422422
case tp: AliasingBounds =>
423423
" = " ~ toText(tp.alias)
424424
case TypeBounds(lo, hi) =>
425-
(if (lo isRef defn.NothingClass) Text() else " >: " ~ toText(lo))
426-
~ (if hi.isAny || (!printDebug && hi.isFromJavaObject) then Text() else " <: " ~ toText(hi))
425+
(if lo.isExactlyNothing then Text() else " >: " ~ toText(lo))
426+
~ (if hi.isExactlyAny || (!printDebug && hi.isFromJavaObject) then Text() else " <: " ~ toText(hi))
427427
tparamStr ~ binder
428428
case tp @ ClassInfo(pre, cls, cparents, decls, selfInfo) =>
429429
val preText = toTextLocal(pre)

0 commit comments

Comments
 (0)