diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-19 12:01:25 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-19 20:25:35 +0200 |
commit | 648dae6a504f0a5c24d3a7f6efc996f508a006ce (patch) | |
tree | 8addffd07f20b5c75351352db1291708be887ccf /src/compiler | |
parent | b0a4d536482c6582bafb383a30f553862aceb00f (diff) | |
download | scala-648dae6a504f0a5c24d3a7f6efc996f508a006ce.tar.gz scala-648dae6a504f0a5c24d3a7f6efc996f508a006ce.tar.bz2 scala-648dae6a504f0a5c24d3a7f6efc996f508a006ce.zip |
SI-6394 fixes macros.Context.enclosingClass
Previously I used typer.context.enclClass, but it seems to do something
completely unexpected, so I switched to manual context traversal.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/reflect/macros/runtime/Enclosures.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/Enclosures.scala b/src/compiler/scala/reflect/macros/runtime/Enclosures.scala index ebde4447d7..b5c988ca83 100644 --- a/src/compiler/scala/reflect/macros/runtime/Enclosures.scala +++ b/src/compiler/scala/reflect/macros/runtime/Enclosures.scala @@ -14,7 +14,7 @@ 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 enclosingClass: Tree = site.enclClass.tree + val enclosingClass: Tree = enclTrees collectFirst { case x: ImplDef => x } getOrElse EmptyTree val enclosingImplicits: List[(Type, Tree)] = site.openImplicits val enclosingMacros: List[Context] = this :: universe.analyzer.openMacros // include self val enclosingMethod: Tree = site.enclMethod.tree |