@@ -269,7 +269,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
269
269
else if (suppressKw) PrintableFlags &~ Private
270
270
else PrintableFlags
271
271
if (homogenizedView && mods.flags.isTypeFlags) flagMask &~= Implicit // drop implicit from classes
272
- val flagsText = ( mods.flags & flagMask).toString
272
+ val flagsText = keywordStr(( mods.flags & flagMask).toString)
273
273
Text (mods.annotations.map(annotText), " " ) ~~ flagsText ~~ (kw provided ! suppressKw)
274
274
}
275
275
@@ -471,13 +471,13 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
471
471
(" (" ~ toTextGlobal(implicits, " , " ) ~ " )" provided implicits.nonEmpty)
472
472
case tree @ ValDef (name, tpt, _) =>
473
473
dclTextOr {
474
- modText(tree.mods, keywordStr (if (tree.mods is Mutable ) " var" else " val" )) ~~
474
+ modText(tree.mods, valDefStr (if (tree.mods is Mutable ) " var" else " val" )) ~~
475
475
nameIdText(tree) ~ optAscription(tpt) ~
476
476
withEnclosingDef(tree) { optText(tree.rhs)(" = " ~ _) }
477
477
}
478
478
case tree @ DefDef (name, tparams, vparamss, tpt, _) =>
479
479
dclTextOr {
480
- val prefix = modText(tree.mods, keywordStr (" def" )) ~~ nameIdText(tree)
480
+ val prefix = modText(tree.mods, valDefStr (" def" )) ~~ nameIdText(tree)
481
481
withEnclosingDef(tree) {
482
482
addVparamssText(prefix ~ tparamsText(tparams), vparamss) ~ optAscription(tpt) ~
483
483
optText(tree.rhs)(" = " ~ _)
@@ -590,7 +590,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
590
590
t ~ cxBoundToText(cxb)
591
591
}
592
592
case PatDef (mods, pats, tpt, rhs) =>
593
- modText(mods, keywordStr (" val" )) ~~ toText(pats, " , " ) ~ optAscription(tpt) ~
593
+ modText(mods, valDefStr (" val" )) ~~ toText(pats, " , " ) ~ optAscription(tpt) ~
594
594
optText(rhs)(" = " ~ _)
595
595
case ParsedTry (expr, handler, finalizer) =>
596
596
changePrec(GlobalPrec ) {
@@ -703,7 +703,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
703
703
else {
704
704
var flags = sym.flagsUNSAFE
705
705
if (flags is TypeParam ) flags = flags &~ Protected
706
- Text ((flags & PrintableFlags ).flagStrings map stringToText, " " )
706
+ Text ((flags & PrintableFlags ).flagStrings map (flag => stringToText(keywordStr(flag))) , " " )
707
707
}
708
708
709
709
override def toText (denot : Denotation ): Text = denot match {
0 commit comments