Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit a1ea0aa

Browse files
committed
Remove TopLevelCreationFlags
1 parent 2980c39 commit a1ea0aa

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/reflect/scala/reflect/internal/Flags.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,8 @@ class Flags extends ModifierFlags {
234234
*/
235235
final val AllFlags = -1L
236236

237-
/** These flags can be set when class or module symbol is first created.
238-
*/
239-
final val TopLevelCreationFlags =
240-
MODULE | PACKAGE | FINAL | JAVA
241-
242237
// TODO - there's no call to slap four flags onto every package.
243-
final val PackageFlags = TopLevelCreationFlags
238+
final val PackageFlags = MODULE | PACKAGE | FINAL | JAVA
244239

245240
// FINAL not included here due to possibility of object overriding.
246241
// In fact, FINAL should not be attached regardless. We should be able
@@ -300,7 +295,7 @@ class Flags extends ModifierFlags {
300295
final val ConstrFlags = JAVA
301296

302297
/** Module flags inherited by their module-class */
303-
final val ModuleToClassFlags = AccessFlags | TopLevelCreationFlags | CASE | SYNTHETIC
298+
final val ModuleToClassFlags = AccessFlags | PackageFlags | CASE | SYNTHETIC
304299

305300
/** These flags are not pickled */
306301
final val FlagsNotPickled = IS_ERROR | OVERLOADED | LIFTED | TRANS_FLAG | LOCKED | TRIEDCOOKING

src/reflect/scala/reflect/internal/Mirrors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ trait Mirrors extends api.Mirrors {
273273
// is very beneficial for a handful of bootstrap symbols to have
274274
// first class identities
275275
sealed trait WellKnownSymbol extends Symbol {
276-
this initFlags (TopLevelCreationFlags | STATIC)
276+
this initFlags (PackageFlags | STATIC)
277277
}
278278
// Features common to RootClass and RootPackage, the roots of all
279279
// type and term symbols respectively.

0 commit comments

Comments
 (0)