@@ -252,7 +252,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
252
252
(" {" ~ toText(trees, " \n " ) ~ " }" ).close
253
253
254
254
protected def typeApplyText [T >: Untyped ](tree : TypeApply [T ]): Text = {
255
- val isQuote = tree.fun.hasType && tree.fun.symbol == defn.InternalQuoted_typeQuote
255
+ val isQuote = ! ctx.settings. YprintDebug .value && tree.fun.hasType && tree.fun.symbol == defn.InternalQuoted_typeQuote
256
256
val (open, close) = if (isQuote) (keywordStr(" '[" ), keywordStr(" ]" )) else (" [" , " ]" )
257
257
val funText = toTextLocal(tree.fun).provided(! isQuote)
258
258
tree.fun match {
@@ -334,7 +334,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
334
334
if (name.isTypeName) typeText(txt)
335
335
else txt
336
336
case tree @ Select (qual, name) =>
337
- if (tree.hasType && tree.symbol == defn.QuotedType_splice ) typeText(" ${" ) ~ toTextLocal(qual) ~ typeText(" }" )
337
+ if (! ctx.settings. YprintDebug .value && tree.hasType && tree.symbol == defn.QuotedType_splice ) typeText(" ${" ) ~ toTextLocal(qual) ~ typeText(" }" )
338
338
else if (qual.isType) toTextLocal(qual) ~ " #" ~ typeText(toText(name))
339
339
else toTextLocal(qual) ~ (" ." ~ nameIdText(tree) provided (name != nme.CONSTRUCTOR || ctx.settings.YprintDebug .value))
340
340
case tree : This =>
@@ -346,9 +346,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
346
346
changePrec (GlobalPrec ) {
347
347
keywordStr(" throw " ) ~ toText(args.head)
348
348
}
349
- else if (fun.hasType && fun.symbol == defn.InternalQuoted_exprQuote )
349
+ else if (! ctx.settings. YprintDebug .value && fun.hasType && fun.symbol == defn.InternalQuoted_exprQuote )
350
350
keywordStr(" '{" ) ~ toTextGlobal(args, " , " ) ~ keywordStr(" }" )
351
- else if (fun.hasType && fun.symbol == defn.InternalQuoted_exprSplice )
351
+ else if (! ctx.settings. YprintDebug .value && fun.hasType && fun.symbol == defn.InternalQuoted_exprSplice )
352
352
keywordStr(" ${" ) ~ toTextGlobal(args, " , " ) ~ keywordStr(" }" )
353
353
else
354
354
toTextLocal(fun) ~ " (" ~ toTextGlobal(args, " , " ) ~ " )"
0 commit comments