diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-06 18:19:42 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-06 18:19:42 +0200 |
commit | 04e257d3ce9e6ce44c3cce16d3e28046e04986ce (patch) | |
tree | 34090750c22dc34b0137c188d3be3bd36e726932 /src | |
parent | ab5a9bbfb1e89764dacf6b5ea357a54ea4bb0479 (diff) | |
download | scala-04e257d3ce9e6ce44c3cce16d3e28046e04986ce.tar.gz scala-04e257d3ce9e6ce44c3cce16d3e28046e04986ce.tar.bz2 scala-04e257d3ce9e6ce44c3cce16d3e28046e04986ce.zip |
removes isLocatable from the public API
Hard to come up with a good name, would need extensive documentation
to justify its purpose => no go. If necessary we can always reintroduce
it later in 2.10.1.
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/api/Symbols.scala | 12 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 11 |
2 files changed, 10 insertions, 13 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala index d167099979..1fbbc0c0a4 100644 --- a/src/reflect/scala/reflect/api/Symbols.scala +++ b/src/reflect/scala/reflect/api/Symbols.scala @@ -140,18 +140,6 @@ trait Symbols extends base.Symbols { self: Universe => */ def isErroneous : Boolean - /** Can this symbol be loaded by a reflective mirror? - * - * Scalac relies on `ScalaSignature' annotation to retain symbols across compilation runs. - * Such annotations (also called "pickles") are applied on top-level classes and include information - * about all symbols reachable from the annotee. However, local symbols (e.g. classes or definitions local to a block) - * are typically unreachable and information about them gets lost. - * - * This method is useful for macro writers who wish to save certain ASTs to be used at runtime. - * With `isLocatable' it's possible to check whether a tree can be retained as is, or it needs special treatment. - */ - def isLocatable: 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. diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index dc73d0bc9f..113500fe12 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -853,7 +853,16 @@ trait Symbols extends api.Symbols { self: SymbolTable => final def isInitialized: Boolean = validTo != NoPeriod - /** Determines whether this symbol can be loaded by subsequent reflective compilation */ + /** Can this symbol be loaded by a reflective mirror? + * + * Scalac relies on `ScalaSignature' annotation to retain symbols across compilation runs. + * Such annotations (also called "pickles") are applied on top-level classes and include information + * about all symbols reachable from the annotee. However, local symbols (e.g. classes or definitions local to a block) + * are typically unreachable and information about them gets lost. + * + * This method is useful for macro writers who wish to save certain ASTs to be used at runtime. + * With `isLocatable' it's possible to check whether a tree can be retained as is, or it needs special treatment. + */ final def isLocatable: Boolean = { if (this == NoSymbol) return false if (isRoot || isRootPackage) return true |