diff options
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 |