diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-07 12:28:58 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-07 12:28:58 -0800 |
commit | 426c65030df3df0c3e038931b64199fc4e83c1a0 (patch) | |
tree | 91193a655bf632c4b489aad1bb647f10d9bcb47d /src | |
parent | 8677057f1462f5bc1c9f94ef11e45d9b4a57f7ab (diff) | |
parent | 1f8d642eb9f7b0787087212607e012566a699c04 (diff) | |
download | scala-426c65030df3df0c3e038931b64199fc4e83c1a0.tar.gz scala-426c65030df3df0c3e038931b64199fc4e83c1a0.tar.bz2 scala-426c65030df3df0c3e038931b64199fc4e83c1a0.zip |
Merge remote-tracking branch 'kepler/topic/reflectivecompiler' into develop
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/reflect/runtime/ToolBoxes.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/runtime/ToolBoxes.scala b/src/compiler/scala/reflect/runtime/ToolBoxes.scala index e617239398..02fcf7b448 100644 --- a/src/compiler/scala/reflect/runtime/ToolBoxes.scala +++ b/src/compiler/scala/reflect/runtime/ToolBoxes.scala @@ -88,7 +88,13 @@ trait ToolBoxes extends { self: Universe => def runExpr(expr: Tree): Any = { val etpe = expr.tpe val fvs = (expr filter isFree map (_.symbol)).distinct + + reporter.reset() val className = compileExpr(expr, fvs) + if (reporter.hasErrors) { + throw new Error("reflective compilation has failed") + } + if (settings.debug.value) println("generated: "+className) val jclazz = jClass.forName(moduleFileName(className), true, classLoader) val jmeth = jclazz.getDeclaredMethods.find(_.getName == wrapperMethodName).get |