summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-06 04:31:48 +0000
committerPaul Phillips <paulp@improving.org>2011-05-06 04:31:48 +0000
commit4eb00a0a7227b70c42d46befc7c4418cfa22532e (patch)
tree7e93f682176ab9275146e20e431fa7256f223287 /src
parenta0ea242f75c83717bc8019d1be7865a52fd6186f (diff)
downloadscala-4eb00a0a7227b70c42d46befc7c4418cfa22532e.tar.gz
scala-4eb00a0a7227b70c42d46befc7c4418cfa22532e.tar.bz2
scala-4eb00a0a7227b70c42d46befc7c4418cfa22532e.zip
Issue some repl imports comma-separated rather ...
Issue some repl imports comma-separated rather than in separate statements for speed and better wrapper generation. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/Power.scala13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/Power.scala b/src/compiler/scala/tools/nsc/interpreter/Power.scala
index 5a0830841d..8fbbbe7683 100644
--- a/src/compiler/scala/tools/nsc/interpreter/Power.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/Power.scala
@@ -132,12 +132,13 @@ abstract class Power[G <: Global](
|** New defs! Type power.<tab> to reveal **
""".stripMargin.trim
- def init = customInit getOrElse """
- |import scala.tools.nsc._
- |import scala.collection.JavaConverters._
- |import global.{ error => _, _ }
- |import power.Implicits._
- """.stripMargin
+ private def initImports = List(
+ "scala.tools.nsc._",
+ "scala.collection.JavaConverters._",
+ "global.{ error => _, _ }",
+ "power.Implicits._"
+ )
+ def init = customInit getOrElse "import " + initImports.mkString(", ")
/** Starts up power mode and runs whatever is in init.
*/