Skip to content

Commit df6f80c

Browse files
committed
Don't print LazyRef nodes unless in -Yprint-debug
1 parent e6c5b18 commit df6f80c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
241241
toTextParents(tp.parents) ~~ "{...}"
242242
case JavaArrayType(elemtp) =>
243243
toText(elemtp) ~ "[]"
244+
case tp: LazyRef if !printDebug =>
245+
try toText(tp.ref)
246+
catch case ex: Throwable => "..."
244247
case tp: SelectionProto =>
245248
"?{ " ~ toText(tp.name) ~
246249
(Str(" ") provided !tp.name.toSimpleName.last.isLetterOrDigit) ~

0 commit comments

Comments
 (0)