summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/makro/Symbols.scala
blob: 91a5f6d8a5be70e4f74123ddb21eb1f8a8644f3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package scala.reflect.makro

trait Symbols {
  self: Context =>

  /** 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(sym: Symbol): Boolean
}