diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/reflect/base/Base.scala | 1 | ||||
-rw-r--r-- | src/library/scala/reflect/base/FlagSets.scala | 6 | ||||
-rw-r--r-- | src/library/scala/reflect/base/Trees.scala | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/library/scala/reflect/base/Base.scala b/src/library/scala/reflect/base/Base.scala index ddb502fd44..6d13395019 100644 --- a/src/library/scala/reflect/base/Base.scala +++ b/src/library/scala/reflect/base/Base.scala @@ -234,7 +234,6 @@ class Base extends Universe { self => override val privateWithin: Name, override val annotations: List[Tree]) extends ModifiersBase { def hasFlag(flags: FlagSet) = (this.flags & flags) != 0 - def hasAllFlags(flags: FlagSet) = (flags & ~this.flags) == 0 } implicit val ModifiersTag = ClassTag[Modifiers](classOf[Modifiers]) diff --git a/src/library/scala/reflect/base/FlagSets.scala b/src/library/scala/reflect/base/FlagSets.scala index 57946d0f27..43de9970c0 100644 --- a/src/library/scala/reflect/base/FlagSets.scala +++ b/src/library/scala/reflect/base/FlagSets.scala @@ -13,5 +13,11 @@ trait FlagSets { self: Universe => /** The empty set of flags */ val NoFlags: FlagSet + + /** The base API all flag bearers support */ + trait HasFlagsBase { + def flags: FlagSet + def hasFlag(flags: FlagSet): Boolean + } } diff --git a/src/library/scala/reflect/base/Trees.scala b/src/library/scala/reflect/base/Trees.scala index 2814450ae3..ab03b7a89f 100644 --- a/src/library/scala/reflect/base/Trees.scala +++ b/src/library/scala/reflect/base/Trees.scala @@ -1356,10 +1356,7 @@ trait Trees { self: Universe => implicit val ModifiersTag: ClassTag[Modifiers] /** ... */ - abstract class ModifiersBase { - def flags: FlagSet - def hasFlag(flags: FlagSet): Boolean - def hasAllFlags(flags: FlagSet): Boolean + abstract class ModifiersBase extends HasFlagsBase { def privateWithin: Name // default: EmptyTypeName def annotations: List[Tree] // default: List() def mapAnnotations(f: List[Tree] => List[Tree]): Modifiers = |