File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
compiler/src/dotty/tools/dotc/tastyreflect
library/src/scala/tasty/reflect Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ trait FlagsOpsImpl extends scala.tasty.reflect.FlagsOps with CoreImpl {
1414 }
1515
1616 object Flags extends FlagsModule {
17+ def Private : Flags = core.Flags .Private
1718 def Protected : Flags = core.Flags .Protected
1819 def Abstract : Flags = core.Flags .Abstract
1920 def Final : Flags = core.Flags .Final
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ trait FlagsOps extends Core {
1414
1515 val Flags : FlagsModule
1616 abstract class FlagsModule {
17+
18+ /** Is this symbol `private` */
19+ def Private : Flags
20+
1721 /** Is this symbol `protected` */
1822 def Protected : Flags
1923
@@ -56,7 +60,7 @@ trait FlagsOps extends Core {
5660 /** Is this symbol a trait */
5761 def Trait : Flags
5862
59- /** Is this symbol local? Used in conjunction with Private /private[Type] to mean private[this] extends Modifier proctected[this] */
63+ /** Is this symbol local? Used in conjunction with private /private[Type] to mean private[this] extends Modifier proctected[this] */
6064 def Local : Flags
6165
6266 /** Was this symbol generated by Scala compiler */
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ trait Printers
100100
101101 def showFlags (flags : Flags )(implicit ctx : Context ): String = {
102102 val flagList = List .newBuilder[String ]
103+ if (flags.is(Flags .Private )) flagList += " Flags.Private"
103104 if (flags.is(Flags .Protected )) flagList += " Flags.Protected"
104105 if (flags.is(Flags .Abstract )) flagList += " Flags.Abstract"
105106 if (flags.is(Flags .Final )) flagList += " Flags.Final"
@@ -471,6 +472,7 @@ trait Printers
471472
472473 def showFlags (flags : Flags )(implicit ctx : Context ): String = {
473474 val flagList = List .newBuilder[String ]
475+ if (flags.is(Flags .Private )) flagList += " private"
474476 if (flags.is(Flags .Protected )) flagList += " protected"
475477 if (flags.is(Flags .Abstract )) flagList += " abstract"
476478 if (flags.is(Flags .Final )) flagList += " final"
You can’t perform that action at this time.
0 commit comments