diff options
5 files changed, 13 insertions, 38 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/CapturedVariables.scala b/src/compiler/scala/reflect/macros/runtime/CapturedVariables.scala deleted file mode 100644 index 78fb7100b0..0000000000 --- a/src/compiler/scala/reflect/macros/runtime/CapturedVariables.scala +++ /dev/null @@ -1,15 +0,0 @@ -package scala.reflect.macros -package runtime - -trait CapturedVariables { - self: Context => - - import mirror._ - import universe._ - - def captureVariable(vble: Symbol): Unit = universe.captureVariable(vble) - - def referenceCapturedVariable(vble: Symbol): Tree = universe.referenceCapturedVariable(vble) - - def capturedVariableType(vble: Symbol): Type = universe.capturedVariableType(vble) -}
\ No newline at end of file diff --git a/src/compiler/scala/reflect/macros/runtime/Context.scala b/src/compiler/scala/reflect/macros/runtime/Context.scala index 1c6313c930..aa5dfc47b2 100644 --- a/src/compiler/scala/reflect/macros/runtime/Context.scala +++ b/src/compiler/scala/reflect/macros/runtime/Context.scala @@ -5,7 +5,6 @@ import scala.tools.nsc.Global abstract class Context extends scala.reflect.macros.Context with Aliases - with CapturedVariables with Infrastructure with Enclosures with Names diff --git a/src/reflect/scala/reflect/macros/CapturedVariables.scala b/src/reflect/scala/reflect/macros/CapturedVariables.scala deleted file mode 100644 index 60ed6f5e7b..0000000000 --- a/src/reflect/scala/reflect/macros/CapturedVariables.scala +++ /dev/null @@ -1,21 +0,0 @@ -package scala.reflect -package macros - -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 -}
\ No newline at end of file diff --git a/src/reflect/scala/reflect/macros/Context.scala b/src/reflect/scala/reflect/macros/Context.scala index 75f2e459b6..16ebbe7259 100644 --- a/src/reflect/scala/reflect/macros/Context.scala +++ b/src/reflect/scala/reflect/macros/Context.scala @@ -6,7 +6,6 @@ package macros // the full context should include all traits from scala.reflect.macros (and probably reside in scala-compiler.jar) trait Context extends Aliases - with CapturedVariables with Enclosures with Infrastructure with Names diff --git a/src/reflect/scala/reflect/macros/Universe.scala b/src/reflect/scala/reflect/macros/Universe.scala index f84c11ee63..233033f35b 100644 --- a/src/reflect/scala/reflect/macros/Universe.scala +++ b/src/reflect/scala/reflect/macros/Universe.scala @@ -109,4 +109,17 @@ abstract class Universe extends scala.reflect.api.Universe { trait IdentContextApi extends IdentApi { this: Ident => def isBackquoted: Boolean } + + /** 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 }
\ No newline at end of file |