From 225102627d37f16134bc682eb5b01270684a02e4 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 4 Sep 2014 08:35:42 +0200 Subject: Add inSuperCall mode and flag. Needed to keep a record of definitions in supercall arguments. These may not see the enclosing class. --- src/dotty/tools/dotc/core/Flags.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dotty/tools/dotc/core/Flags.scala') diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala index d28a879d1..f89a5ce46 100644 --- a/src/dotty/tools/dotc/core/Flags.scala +++ b/src/dotty/tools/dotc/core/Flags.scala @@ -238,9 +238,6 @@ object Flags { /** A mutable var */ final val Mutable = termFlag(12, "mutable") - /** Class symbol is defined in this/superclass constructor. */ - final val InConstructor = typeFlag(12, "") - /** Symbol is local to current class (i.e. private[this] or protected[this] * pre: Private or Protected are also set */ @@ -359,6 +356,9 @@ object Flags { // Flags following this one are not pickled + /** Symbol is defined in a super call */ + final val InSuperCall = commonFlag(46, "") + /** Symbol with private access is accessed outside its private scope */ final val NotJavaPrivate = commonFlag(47, "") @@ -432,8 +432,8 @@ object Flags { /** Flags guaranteed to be set upon symbol creation */ final val FromStartFlags = - AccessFlags | Module | Package | Deferred | MethodOrHKCommon | Param | ParamAccessor | Scala2ExistentialCommon | Touched | - Static | CovariantOrOuter | ContravariantOrLabel | ExpandedName | AccessorOrSealed | + AccessFlags | Module | Package | Deferred | MethodOrHKCommon | Param | ParamAccessor | Scala2ExistentialCommon | + InSuperCall | Touched | Static | CovariantOrOuter | ContravariantOrLabel | ExpandedName | AccessorOrSealed | CaseAccessorOrTypeArgument | Frozen | Erroneous | ImplicitCommon | Permanent | SelfNameOrImplClass assert(FromStartFlags.isTermFlags && FromStartFlags.isTypeFlags) @@ -476,7 +476,7 @@ object Flags { /** Flags that can apply to a module class */ final val RetainedModuleClassFlags: FlagSet = RetainedModuleValAndClassFlags | - InConstructor | ImplClass + InSuperCall | ImplClass /** Packages and package classes always have these flags set */ final val PackageCreationFlags = -- cgit v1.2.3