File tree Expand file tree Collapse file tree 6 files changed +7
-13
lines changed
library/scala/reflect/base Expand file tree Collapse file tree 6 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,9 @@ class Base extends Universe { self =>
233
233
234
234
class Modifiers (override val flags : FlagSet ,
235
235
override val privateWithin : Name ,
236
- override val annotations : List [Tree ]) extends ModifiersBase
236
+ override val annotations : List [Tree ]) extends ModifiersBase {
237
+ def hasFlag (flags : FlagSet ) = (this .flags & flags) != 0
238
+ }
237
239
238
240
implicit val ModifiersTag = ClassTag [Modifiers ](classOf [Modifiers ])
239
241
Original file line number Diff line number Diff line change @@ -13,10 +13,4 @@ trait FlagSets { self: Universe =>
13
13
14
14
/** The empty set of flags */
15
15
val NoFlags : FlagSet
16
-
17
- /** The base API all flag bearers support */
18
- trait HasFlagsBase {
19
- def flags : FlagSet
20
- }
21
16
}
22
-
Original file line number Diff line number Diff line change @@ -1359,7 +1359,9 @@ trait Trees { self: Universe =>
1359
1359
implicit val ModifiersTag : ClassTag [Modifiers ]
1360
1360
1361
1361
/** ... */
1362
- abstract class ModifiersBase extends HasFlagsBase {
1362
+ abstract class ModifiersBase {
1363
+ def flags : FlagSet // default: NoFlags
1364
+ def hasFlag (flag : FlagSet ): Boolean
1363
1365
def privateWithin : Name // default: EmptyTypeName
1364
1366
def annotations : List [Tree ] // default: List()
1365
1367
def mapAnnotations (f : List [Tree ] => List [Tree ]): Modifiers =
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ trait Symbols extends base.Symbols { self: Universe =>
13
13
override type FreeTypeSymbol >: Null <: TypeSymbol with FreeTypeSymbolApi
14
14
15
15
/** The API of symbols */
16
- trait SymbolApi extends SymbolBase with HasFlagsBase { this : Symbol =>
16
+ trait SymbolApi extends SymbolBase { this : Symbol =>
17
17
18
18
/** The position of this symbol
19
19
*/
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
80
80
def toType : Type = tpe
81
81
def toTypeIn (site : Type ): Type = site.memberType(this )
82
82
def toTypeConstructor : Type = typeConstructor
83
- def setFlags (flags : FlagSet ): this .type = setInternalFlags(flags)
84
- def setInternalFlags (flag : Long ): this .type = { setFlag(flag); this }
85
83
def setTypeSignature (tpe : Type ): this .type = { setInfo(tpe); this }
86
84
def getAnnotations : List [AnnotationInfo ] = { initialize; annotations }
87
85
def setAnnotations (annots : AnnotationInfo * ): this .type = { setAnnotations(annots.toList); this }
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ abstract class Universe extends scala.reflect.api.Universe {
24
24
*/
25
25
trait SymbolContextApi extends SymbolApi with AttachableApi { self : Symbol =>
26
26
27
- def setFlags (flags : FlagSet ): Symbol
28
-
29
27
def setTypeSignature (tpe : Type ): Symbol
30
28
31
29
def setAnnotations (annots : AnnotationInfo * ): Symbol
You can’t perform that action at this time.
0 commit comments