diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-17 20:35:53 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-18 10:23:30 +0200 |
commit | 38aaa3a24ae8081c7552eede4f805e8ff063b49d (patch) | |
tree | eb0b323942be31d79c81148576f7604a09cca7b5 /src | |
parent | 0cfd858a38ddf0ac83d9bbefe85110f88dc707c0 (diff) | |
download | scala-38aaa3a24ae8081c7552eede4f805e8ff063b49d.tar.gz scala-38aaa3a24ae8081c7552eede4f805e8ff063b49d.tar.bz2 scala-38aaa3a24ae8081c7552eede4f805e8ff063b49d.zip |
SI-5695 removes Context.enclosingApplication
Apparently it's impossible to find out the enclosing Apply node
if you're an argument being typechecked (because the arguments
are typechecked separately from the enclosing Apply).
This functionality is by far not a core feature of macros,
so I'm removing it.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/reflect/makro/runtime/Enclosures.scala | 1 | ||||
-rw-r--r-- | src/reflect/scala/reflect/makro/Enclosures.scala | 4 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/compiler/scala/reflect/makro/runtime/Enclosures.scala b/src/compiler/scala/reflect/makro/runtime/Enclosures.scala index 80c35d22ff..360a4b8e8a 100644 --- a/src/compiler/scala/reflect/makro/runtime/Enclosures.scala +++ b/src/compiler/scala/reflect/makro/runtime/Enclosures.scala @@ -14,7 +14,6 @@ trait Enclosures { // vals are eager to simplify debugging // after all we wouldn't save that much time by making them lazy val macroApplication: Tree = expandee - val enclosingApplication: Tree = enclTrees collectFirst { case t: Apply => t } getOrElse EmptyTree val enclosingClass: Tree = site.enclClass.tree val enclosingImplicits: List[(Type, Tree)] = site.openImplicits val enclosingMacros: List[Context] = this :: universe.analyzer.openMacros // include self diff --git a/src/reflect/scala/reflect/makro/Enclosures.scala b/src/reflect/scala/reflect/makro/Enclosures.scala index 69bd8d09c7..ff5c13a785 100644 --- a/src/reflect/scala/reflect/makro/Enclosures.scala +++ b/src/reflect/scala/reflect/makro/Enclosures.scala @@ -36,10 +36,6 @@ trait Enclosures { */ val enclosingPosition: Position - /** Tree that corresponds to the enclosing application, or EmptyTree if not applicable. - */ - val enclosingApplication: Tree - /** Tree that corresponds to the enclosing method, or EmptyTree if not applicable. */ val enclosingMethod: Tree |