From 178069e13d841c029bd3cf78773788ad3743e218 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Thu, 7 Jun 2012 22:15:12 +0200 Subject: quickfix for a nasty assertion --- .../scala/reflect/makro/runtime/Reifiers.scala | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/reflect/makro/runtime/Reifiers.scala b/src/compiler/scala/reflect/makro/runtime/Reifiers.scala index c578fceb2c..10b5ae5f42 100644 --- a/src/compiler/scala/reflect/makro/runtime/Reifiers.scala +++ b/src/compiler/scala/reflect/makro/runtime/Reifiers.scala @@ -40,13 +40,25 @@ trait Reifiers { Select(tree, ExprSplice) } - object utils extends { - val global: self.global.type = self.global - val typer: global.analyzer.Typer = self.callsiteTyper - } with scala.reflect.reify.utils.Utils - import utils._ + // fixme: if I put utils here, then "global" from utils' early initialization syntax + // and "global" that comes from here conflict with each other when incrementally compiling + // the problem is that both are pickled with the same owner - trait Reifiers + // and this upsets the compiler, so that oftentimes it throws assertion failures + // Martin knows the details + // + // object utils extends { + // val global: self.global.type = self.global + // val typer: global.analyzer.Typer = self.callsiteTyper + // } with scala.reflect.reify.utils.Utils + // import utils._ private def logFreeVars(position: Position, reification: Tree): Unit = { + object utils extends { + val global: self.global.type = self.global + val typer: global.analyzer.Typer = self.callsiteTyper + } with scala.reflect.reify.utils.Utils + import utils._ + def logFreeVars(symtab: SymbolTable): Unit = // logging free vars only when they are untyped prevents avalanches of duplicate messages symtab.syms map (sym => symtab.symDef(sym)) foreach { -- cgit v1.2.3