summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Internals.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-02-15 01:48:34 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-02-15 09:32:28 +0100
commitc9ca7370575ef2245b03ead50ec86fad99c3cce9 (patch)
treecc062e1441d23e85d0864d2a7e098bda72e968ab /src/reflect/scala/reflect/internal/Internals.scala
parent25e7274ef7f0ffaf511460c3a130c8064b5d44e2 (diff)
downloadscala-c9ca7370575ef2245b03ead50ec86fad99c3cce9.tar.gz
scala-c9ca7370575ef2245b03ead50ec86fad99c3cce9.tar.bz2
scala-c9ca7370575ef2245b03ead50ec86fad99c3cce9.zip
SI-6785 exposes Symbol.flags, setFlag and resetFlag
My first feeling was not to expose Symbol.flags, because that would inevitably lead to exposing more methods on FlagSet. However we do need flag manipulation in async, which is representative of advanced macros, so I'm caving in.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Internals.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Internals.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Internals.scala b/src/reflect/scala/reflect/internal/Internals.scala
index 994b907042..a283dd819a 100644
--- a/src/reflect/scala/reflect/internal/Internals.scala
+++ b/src/reflect/scala/reflect/internal/Internals.scala
@@ -93,6 +93,7 @@ trait Internals extends api.Internals {
def fullyInitialize(symbol: Symbol): symbol.type = definitions.fullyInitializeSymbol(symbol).asInstanceOf[symbol.type]
def fullyInitialize(tp: Type): tp.type = definitions.fullyInitializeType(tp).asInstanceOf[tp.type]
def fullyInitialize(scope: Scope): scope.type = definitions.fullyInitializeScope(scope).asInstanceOf[scope.type]
+ def flags(symbol: Symbol): FlagSet = symbol.flags
def attachments(symbol: Symbol): Attachments { type Pos = Position } = symbol.attachments
def updateAttachment[T: ClassTag](symbol: Symbol, attachment: T): symbol.type = symbol.updateAttachment(attachment)
def removeAttachment[T: ClassTag](symbol: Symbol): symbol.type = symbol.removeAttachment[T]
@@ -101,6 +102,8 @@ trait Internals extends api.Internals {
def setAnnotations(symbol: Symbol, annots: Annotation*): symbol.type = symbol.setAnnotations(annots: _*)
def setName(symbol: Symbol, name: Name): symbol.type = symbol.setName(name)
def setPrivateWithin(symbol: Symbol, sym: Symbol): symbol.type = symbol.setPrivateWithin(sym)
+ def setFlag(symbol: Symbol, flags: FlagSet): symbol.type = symbol.setFlag(flags)
+ def resetFlag(symbol: Symbol, flags: FlagSet): symbol.type = symbol.resetFlag(flags)
def thisType(sym: Symbol): Type = self.ThisType(sym)
def singleType(pre: Type, sym: Symbol): Type = self.SingleType(pre, sym)