Skip to content

Commit 55c7232

Browse files
committed
Get rid of NotPrivate flag.
It is now redundant.
1 parent d9c2157 commit 55c7232

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

src/dotty/tools/dotc/core/Flags.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ object Flags {
367367
/** Symbol is defined in a super call */
368368
final val InSuperCall = commonFlag(46, "<in supercall>")
369369

370-
/** Symbol with private access is accessed outside its private scope */
371-
final val NotJavaPrivate = commonFlag(47, "<not-java-private>")
372-
373370
/** Denotation is in train of being loaded and completed, used to catch cyclic dependencies */
374371
final val Touched = commonFlag(48, "<touched>")
375372

src/dotty/tools/dotc/transform/Constructors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Constructors extends MiniPhaseTransform with SymTransformer { thisTransfor
5656
private def mightBeDropped(sym: Symbol)(implicit ctx: Context) =
5757
sym.is(Private, butNot = KeeperFlags) && !sym.is(MutableParamAccessor)
5858

59-
private final val KeeperFlags = Method | Lazy | NotJavaPrivate
59+
private final val KeeperFlags = Method | Lazy
6060
private final val MutableParamAccessor = allOf(Mutable, ParamAccessor)
6161

6262
override def transformTemplate(tree: Template)(implicit ctx: Context, info: TransformerInfo): Tree = {

src/dotty/tools/dotc/transform/LambdaLift.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,10 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
290290
val (newOwner, maybeStatic) =
291291
if (lOwner is Package) (local.topLevelClass, JavaStatic)
292292
else (lOwner, EmptyFlags)
293-
val maybeNotJavaPrivate = if (calledFromInner(local)) NotJavaPrivate else EmptyFlags
294293
local.copySymDenotation(
295294
owner = newOwner,
296295
name = newName(local),
297-
initFlags = local.flags &~ InSuperCall | Private | maybeStatic | maybeNotJavaPrivate,
296+
initFlags = local.flags &~ InSuperCall | Private | maybeStatic,
298297
info = liftedInfo(local)).installAfter(thisTransform)
299298
if (local.isClass)
300299
for (member <- local.asClass.info.decls)

src/dotty/tools/dotc/transform/PrivateToStatic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PrivateToStatic extends MiniPhase with SymTransformer { thisTransform =>
3333
def shouldBeStatic(sd: SymDenotation)(implicit ctx: Context) =
3434
sd.current(ctx.withPhase(thisTransform)).asSymDenotation
3535
.is(PrivateMethod, butNot = Immovable) &&
36-
(sd.owner.is(Trait) || sd.is(NotJavaPrivate))
36+
sd.owner.is(Trait)
3737

3838
override def transformSym(sd: SymDenotation)(implicit ctx: Context): SymDenotation =
3939
if (shouldBeStatic(sd)) {

0 commit comments

Comments
 (0)