@@ -471,13 +471,13 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
471471 (" (" ~ toTextGlobal(implicits, " , " ) ~ " )" provided implicits.nonEmpty)
472472 case tree @ ValDef (name, tpt, _) =>
473473 dclTextOr {
474- modText(tree.mods, valDefStr (if (tree.mods is Mutable ) " var" else " val" )) ~~
475- nameIdText(tree) ~ optAscription(tpt) ~
474+ modText(tree.mods, keywordStr (if (tree.mods is Mutable ) " var" else " val" )) ~~
475+ valDefText( nameIdText(tree) ) ~ optAscription(tpt) ~
476476 withEnclosingDef(tree) { optText(tree.rhs)(" = " ~ _) }
477477 }
478478 case tree @ DefDef (name, tparams, vparamss, tpt, _) =>
479479 dclTextOr {
480- val prefix = modText(tree.mods, valDefStr (" def" )) ~~ nameIdText(tree)
480+ val prefix = modText(tree.mods, keywordStr (" def" )) ~~ valDefText( nameIdText(tree) )
481481 withEnclosingDef(tree) {
482482 addVparamssText(prefix ~ tparamsText(tparams), vparamss) ~ optAscription(tpt) ~
483483 optText(tree.rhs)(" = " ~ _)
@@ -590,7 +590,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
590590 t ~ cxBoundToText(cxb)
591591 }
592592 case PatDef (mods, pats, tpt, rhs) =>
593- modText(mods, valDefStr (" val" )) ~~ toText(pats, " , " ) ~ optAscription(tpt) ~
593+ modText(mods, keywordStr (" val" )) ~~ toText(pats, " , " ) ~ optAscription(tpt) ~
594594 optText(rhs)(" = " ~ _)
595595 case ParsedTry (expr, handler, finalizer) =>
596596 changePrec(GlobalPrec ) {
0 commit comments