diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-03 23:51:49 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-03 23:51:49 +0000 |
commit | 2b82a20d75629e7bdd2fd3d4d4613fc2ef072a78 (patch) | |
tree | f3576cf0318b4fafb550e09d6fd93ebf022b76bb /test/files/run | |
parent | 19e78a93e6b1c889460936f0c96728cb0e81726d (diff) | |
download | scala-2b82a20d75629e7bdd2fd3d4d4613fc2ef072a78.tar.gz scala-2b82a20d75629e7bdd2fd3d4d4613fc2ef072a78.tar.bz2 scala-2b82a20d75629e7bdd2fd3d4d4613fc2ef072a78.zip |
A big push to make the interpreter easier to in...
A big push to make the interpreter easier to instantiate without having
to dodge bullets. It shouldn't have to be any harder than this:
scala> new scala.tools.nsc.Interpreter().evalExpr[Int]("5*5")
res0: Int = 25
...and now it isn't. Review by community.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t1500.scala | 6 | ||||
-rw-r--r-- | test/files/run/t1501.scala | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/test/files/run/t1500.scala b/test/files/run/t1500.scala index de79b84e75..ce6278cd05 100644 --- a/test/files/run/t1500.scala +++ b/test/files/run/t1500.scala @@ -18,10 +18,10 @@ object Test { def main(args: Array[String]) = { - val tool = new Interpreter(new Settings()) + val settings = new Settings() + settings.classpath.value = System.getProperty("java.class.path") + val tool = new Interpreter(settings) val global = tool.compiler - // when running that compiler, give it a scala-library to the classpath - global.settings.classpath.value = System.getProperty("java.class.path") import global._ import definitions._ diff --git a/test/files/run/t1501.scala b/test/files/run/t1501.scala index 851daae0bb..f1eb8f287d 100644 --- a/test/files/run/t1501.scala +++ b/test/files/run/t1501.scala @@ -28,12 +28,10 @@ object Test { </code>.text def main(args: Array[String]) = { - - val tool = new Interpreter(new Settings()) + val settings = new Settings() + settings.classpath.value = System.getProperty("java.class.path") + val tool = new Interpreter(settings) val global = tool.compiler - // when running that compiler, give it a scala-library to the classpath - global.settings.classpath.value = System.getProperty("java.class.path") - import global._ import definitions._ |