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

trait CapturedVariables {
  self: Context =>

  import mirror._

  /** Mark a variable as captured; i.e. force boxing in a *Ref type.
   */
  def captureVariable(vble: Symbol): Unit

  /** Mark given identifier as a reference to a captured variable itself
   *  suppressing dereferencing with the `elem` field.
   */
  def referenceCapturedVariable(vble: Symbol): Tree

  /** Convert type of a captured variable to *Ref type.
   */
  def capturedVariableType(vble: Symbol): Type
}