diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 21:11:38 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 21:11:38 +0200 |
commit | 114be21b0d6ba4bbaaa067d856eabd7ef89d3d2e (patch) | |
tree | 9c9500fab99ab5e563e33f5a4da1c67d916b73dd /src | |
parent | f4d7febab57f7cc172abebfb3233f0ab771cd72a (diff) | |
download | scala-114be21b0d6ba4bbaaa067d856eabd7ef89d3d2e.tar.gz scala-114be21b0d6ba4bbaaa067d856eabd7ef89d3d2e.tar.bz2 scala-114be21b0d6ba4bbaaa067d856eabd7ef89d3d2e.zip |
adds isStatic to Symbols API in macro context
@paulp I think this is the place we should dump the contents of AbsSymbolInternal to
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/reflect/makro/runtime/Symbols.scala | 2 | ||||
-rw-r--r-- | src/library/scala/reflect/makro/Symbols.scala | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/makro/runtime/Symbols.scala b/src/compiler/scala/reflect/makro/runtime/Symbols.scala index 552ad2a303..6341523486 100644 --- a/src/compiler/scala/reflect/makro/runtime/Symbols.scala +++ b/src/compiler/scala/reflect/makro/runtime/Symbols.scala @@ -5,4 +5,6 @@ trait Symbols { self: Context => def isLocatable(sym: Symbol) = sym.isLocatable + + def isStatic(sym: Symbol) = sym.isStatic }
\ No newline at end of file diff --git a/src/library/scala/reflect/makro/Symbols.scala b/src/library/scala/reflect/makro/Symbols.scala index 91a5f6d8a5..ca1c17534c 100644 --- a/src/library/scala/reflect/makro/Symbols.scala +++ b/src/library/scala/reflect/makro/Symbols.scala @@ -14,4 +14,11 @@ trait Symbols { * With `isLocatable' it's possible to check whether a tree can be retained as is, or it needs special treatment. */ def isLocatable(sym: Symbol): Boolean + + /** Is this symbol static (i.e. with no outer instance)? + * Q: When exactly is a sym marked as STATIC? + * A: If it's a member of a toplevel object, or of an object contained in a toplevel object, or any number of levels deep. + * http://groups.google.com/group/scala-internals/browse_thread/thread/d385bcd60b08faf6 + */ + def isStatic(sym: Symbol): Boolean }
\ No newline at end of file |