Skip to content

Commit 81b8736

Browse files
committed
ClassPrinter: private[this], #SCL-23333
1 parent 0397bf3 commit 81b8736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scala/scala-impl/src/org/jetbrains/plugins/scala/text/ClassPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class ClassPrinter(isScala3: Boolean, extendsSeparator: String = " ", withPrivat
227227
val annotations = p.annotations.map(textOf).mkString(" ")
228228
val modifiers = {
229229
val s = textOf(p.getModifierList)
230-
if (withPrivate) s else s.replace("private ", "")
230+
if (withPrivate) s else s.replace("private[this] ", "").replace("private ", "")
231231
}
232232
val keyword =
233233
if (withPrivate || !isPrivate(p)) if (p.isVal) (if (!normalize || !(inCaseClass && modifiers.isEmpty)) "val " else "") else if (p.isVar) "var " else ""

0 commit comments

Comments
 (0)