Skip to content

Commit 1821b50

Browse files
committed
More debug options for printing
- Mark splices in code under -print-debug - Print owners of all definitions under -print-debug-owners
1 parent 1c18ed5 commit 1821b50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
447447
if (ctx.settings.YprintDebug.value) "[" ~ toText(t) ~ "]#TS#"
448448
else toText(t)
449449
case tpd.UntypedSplice(t) =>
450-
if (ctx.settings.YprintDebug.value) "[" ~ toText(t) ~ "]#US#"
451-
toText(t)
450+
if (ctx.settings.YprintDebug.value) "[" ~ toText(t) ~ ":" ~ toText(tree.typeOpt) ~ "]#US#"
451+
else toText(t)
452452
case tree @ ModuleDef(name, impl) =>
453453
withEnclosingDef(tree) {
454454
modText(tree.mods, NoSymbol, keywordStr("object")) ~~ nameIdText(tree) ~ toTextTemplate(impl)

0 commit comments

Comments
 (0)