From b4671f0103faf079b2c197c8875b484318bc6062 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Sat, 14 Sep 2013 22:11:46 -0700 Subject: SI-7843 Restore JSR 223 service entry The 2.10 fix to remove the ScriptEngine service entry was inadvertently forwarded to 2.11. This commit reverts and adds a test. This situation was entirely foreseen by retronym, proving beyond doubt that he is in fact a time traveler, as hinted by his name. He brings bugs forward into the future and returns into the past with fixes and other alien technology like scalaz. --- test/files/run/t7843-jsr223-service.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/run/t7843-jsr223-service.scala (limited to 'test/files/run/t7843-jsr223-service.scala') diff --git a/test/files/run/t7843-jsr223-service.scala b/test/files/run/t7843-jsr223-service.scala new file mode 100644 index 0000000000..0e3a9e572c --- /dev/null +++ b/test/files/run/t7843-jsr223-service.scala @@ -0,0 +1,10 @@ + +import javax.script._ +import scala.tools.nsc.interpreter.IMain + +object Test extends App { + val engine = new ScriptEngineManager getEngineByName "scala" + engine.asInstanceOf[IMain].settings.usejavacp.value = true + engine put ("n", 10) + engine eval "1 to n.asInstanceOf[Int] foreach print" +} -- cgit v1.2.3