Skip to content

Commit aa7c8eb

Browse files
committed
Add missing keyword color in RefinedPrinter
1 parent 5002f43 commit aa7c8eb

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
@@ -269,7 +269,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
269269
else if (suppressKw) PrintableFlags &~ Private
270270
else PrintableFlags
271271
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)
273273
Text(mods.annotations.map(annotText), " ") ~~ flagsText ~~ (kw provided !suppressKw)
274274
}
275275

@@ -703,7 +703,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
703703
else {
704704
var flags = sym.flagsUNSAFE
705705
if (flags is TypeParam) flags = flags &~ Protected
706-
Text((flags & PrintableFlags).flagStrings map stringToText, " ")
706+
Text((flags & PrintableFlags).flagStrings map (flag => stringToText(keywordStr(flag))), " ")
707707
}
708708

709709
override def toText(denot: Denotation): Text = denot match {

0 commit comments

Comments
 (0)