@@ -351,7 +351,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
351
351
case SeqLiteral (elems, elemtpt) =>
352
352
" [" ~ toTextGlobal(elems, " ," ) ~ " : " ~ toText(elemtpt) ~ " ]"
353
353
case tree @ Inlined (call, bindings, body) =>
354
- ((" /* inlined from " ~ toText(call) ~ " */ " ) provided ! homogenizedView) ~
354
+ ((" /* inlined from " ~ toText(call) ~ " */ " ) provided ! homogenizedView) ~
355
355
blockText(bindings :+ body)
356
356
case tpt : untpd.DerivedTypeTree =>
357
357
" <derived typetree watching " ~ summarized(toText(tpt.watched)) ~ " >"
@@ -525,11 +525,11 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
525
525
if (tree.isType) txt = toText(tp)
526
526
else if (! tree.isDef) txt = (" <" ~ txt ~ " :" ~ toText(tp) ~ " >" ).close
527
527
}
528
- else if (homogenizedView && tree.isType)
528
+ else if (homogenizedView && tree.isType)
529
529
txt = toText(tree.typeOpt)
530
530
if (ctx.settings.Yprintpos .value && ! tree.isInstanceOf [WithoutTypeOrPos [_]]) {
531
- val pos =
532
- if (homogenizedView && ! tree.isInstanceOf [MemberDef ]) tree.pos.toSynthetic
531
+ val pos =
532
+ if (homogenizedView && ! tree.isInstanceOf [MemberDef ]) tree.pos.toSynthetic
533
533
else tree.pos
534
534
val clsStr = " " // DEBUG: if (tree.isType) tree.getClass.toString else ""
535
535
txt = (txt ~ " @" ~ pos.toString ~ clsStr).close
@@ -559,14 +559,12 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
559
559
(sym.allOverriddenSymbols exists (_ is TypeParam ))
560
560
561
561
override def toText (sym : Symbol ): Text = {
562
- if (sym.isImport) {
563
- def importString (tree : untpd.Tree ) = s " import ${tree.show}"
562
+ if (sym.isImport)
564
563
sym.infoOrCompleter match {
565
- case info : Namer # Completer => return importString( info.original)
566
- case info : ImportType => return importString( info.expr)
564
+ case info : Namer # Completer => return info.original.show
565
+ case info : ImportType => return s " import $ info.expr.show "
567
566
case _ =>
568
567
}
569
- }
570
568
if (sym.is(ModuleClass ))
571
569
kindString(sym) ~~ (nameString(sym.name.stripModuleClassSuffix) + idString(sym))
572
570
else
0 commit comments