diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-06 13:35:21 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-06 15:18:56 -0800 |
commit | e51e9b5c5a357967f642262d88244dae550c91b2 (patch) | |
tree | c116f6fe4fb03e7442320ef080eefd9de0d09614 /src/compiler/scala/tools/reflect/ToolBoxFactory.scala | |
parent | fe86aedf4acbb16159c8036edeadbda0bd380771 (diff) | |
download | scala-e51e9b5c5a357967f642262d88244dae550c91b2.tar.gz scala-e51e9b5c5a357967f642262d88244dae550c91b2.tar.bz2 scala-e51e9b5c5a357967f642262d88244dae550c91b2.zip |
Removed unused imports.
A dizzying number of unused imports, limited to files
in src/compiler. I especially like that the unused import
option (not quite ready for checkin itself) finds places
where feature implicits have been imported which are no
longer necessary, e.g. this commit includes half a dozen
removals of "import scala.language.implicitConversions".
Diffstat (limited to 'src/compiler/scala/tools/reflect/ToolBoxFactory.scala')
-rw-r--r-- | src/compiler/scala/tools/reflect/ToolBoxFactory.scala | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala index 996ff00d36..1c5cfe5faa 100644 --- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala +++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala @@ -3,12 +3,8 @@ package reflect import scala.tools.nsc.reporters._ import scala.tools.nsc.CompilerCommand -import scala.tools.nsc.Global -import scala.tools.nsc.typechecker.Modes import scala.tools.nsc.io.VirtualDirectory import scala.tools.nsc.interpreter.AbstractFileClassLoader -import scala.tools.nsc.util.FreshNameCreator -import scala.reflect.internal.Flags import scala.reflect.internal.util.{BatchSourceFile, NoSourceFile, NoFile} import java.lang.{Class => jClass} import scala.compat.Platform.EOL @@ -313,11 +309,9 @@ abstract class ToolBoxFactory[U <: JavaUniverse](val u: U) { factorySelf => // reporter doesn't accumulate errors, but the front-end does def throwIfErrors() = { - if (frontEnd.hasErrors) { - var msg = "reflective compilation has failed: " + EOL + EOL - msg += frontEnd.infos map (_.msg) mkString EOL - throw ToolBoxError(msg) - } + if (frontEnd.hasErrors) throw ToolBoxError( + "reflective compilation has failed: " + EOL + EOL + (frontEnd.infos map (_.msg) mkString EOL) + ) } } |