Skip to content

Commit 9f43572

Browse files
committed
Do not print a space before arguments without flags
1 parent 868fc9b commit 9f43572

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ 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 = keywordStr((mods.flags & flagMask).toString)
272+
val flags = mods.flags & flagMask
273+
val flagsText = if (flags.isEmpty) "" else keywordStr((mods.flags & flagMask).toString)
273274
Text(mods.annotations.map(annotText), " ") ~~ flagsText ~~ (kw provided !suppressKw)
274275
}
275276

0 commit comments

Comments
 (0)