diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 01:48:34 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 09:32:28 +0100 |
commit | c9ca7370575ef2245b03ead50ec86fad99c3cce9 (patch) | |
tree | cc062e1441d23e85d0864d2a7e098bda72e968ab /src/reflect/scala/reflect/macros | |
parent | 25e7274ef7f0ffaf511460c3a130c8064b5d44e2 (diff) | |
download | scala-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/macros')
-rw-r--r-- | src/reflect/scala/reflect/macros/Universe.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/macros/Universe.scala b/src/reflect/scala/reflect/macros/Universe.scala index 08436df5a7..039dcc7331 100644 --- a/src/reflect/scala/reflect/macros/Universe.scala +++ b/src/reflect/scala/reflect/macros/Universe.scala @@ -74,6 +74,12 @@ abstract class Universe extends scala.reflect.api.Universe { /** Sets the `privateWithin` of the symbol. */ def setPrivateWithin(symbol: Symbol, sym: Symbol): symbol.type + /** Enables `flags` on the symbol. */ + def setFlag(symbol: Symbol, flags: FlagSet): symbol.type + + /** Disables `flags` on the symbol. */ + def resetFlag(symbol: Symbol, flags: FlagSet): symbol.type + /** The attachment of the tree. */ def attachments(tree: Tree): Attachments { type Pos = Position } @@ -204,6 +210,12 @@ abstract class Universe extends scala.reflect.api.Universe { /** @see [[internal.setPrivateWithin]] */ def setPrivateWithin(sym: Symbol): T = internal.setPrivateWithin(symbol, sym) + + /** @see [[internal.setFlag]] */ + def setFlag(flags: FlagSet): T = internal.setFlag(symbol, flags) + + /** @see [[internal.setFlag]] */ + def resetFlag(flags: FlagSet): T = internal.resetFlag(symbol, flags) } } } |