diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-30 01:43:18 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-02 13:21:26 +0200 |
commit | c18414d6e1ba89882ba57266bfe96d85fb57713f (patch) | |
tree | 844026b3c2f455358030de0443bfeaa303443de4 /src/compiler | |
parent | 3becbd55aff0401f31fa6782c69c81b88befe39d (diff) | |
download | scala-c18414d6e1ba89882ba57266bfe96d85fb57713f.tar.gz scala-c18414d6e1ba89882ba57266bfe96d85fb57713f.tar.bz2 scala-c18414d6e1ba89882ba57266bfe96d85fb57713f.zip |
miscellaneous cleanup
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Macros.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/reflect/ToolBoxFactory.scala | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala index d157666e47..322b9ebb25 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala @@ -1221,7 +1221,10 @@ trait Macros extends scala.tools.reflect.FastTrack with Traces { case ex: Throwable => None } - } getOrElse realex.getMessage + } getOrElse { + val msg = realex.getMessage + if (msg != null) msg else realex.getClass.getName + } fail(typer, expandee, msg = "exception during macro expansion: " + message) } } diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala index b4178102b9..589c5c7eb0 100644 --- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala +++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala @@ -216,7 +216,7 @@ abstract class ToolBoxFactory[U <: JavaUniverse](val u: U) { factorySelf => (singleton, jmeth) } - def runExpr(expr: Tree, freeTypes: Map[TypeName, Type] = Map[TypeName, Type]()): Any = { + def runExpr(expr: Tree): Any = { val freeTerms = expr.freeTerms // need to calculate them here, because later on they will be erased val thunks = freeTerms map (fte => () => fte.value) // need to be lazy in order not to distort evaluation order |