Skip to content

Commit 8d6389a

Browse files
committed
Handle cyclic references gracefully when printing
1 parent da4a9ee commit 8d6389a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ object Formatting {
2828
case arg: Showable =>
2929
try arg.show
3030
catch {
31+
case ex: CyclicReference => "..."
3132
case NonFatal(ex)
3233
if !ctx.mode.is(Mode.PrintShowExceptions) &&
3334
!ctx.settings.YshowPrintErrors.value =>

0 commit comments

Comments
 (0)