diff options
author | michelou <michelou@epfl.ch> | 2010-12-30 23:53:00 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2010-12-30 23:53:00 +0000 |
commit | bf375f7d6375a2e437342a6d3b935048fa3ec545 (patch) | |
tree | 34a6d17021ee734f365c6044c4ceea1ad3cde8ea /src/compiler/scala/tools/nsc/ScriptRunner.scala | |
parent | 096bc81a90b746ea3fa8a5bd8eb9009c08a71082 (diff) | |
download | scala-bf375f7d6375a2e437342a6d3b935048fa3ec545.tar.gz scala-bf375f7d6375a2e437342a6d3b935048fa3ec545.tar.bz2 scala-bf375f7d6375a2e437342a6d3b935048fa3ec545.zip |
fixed issue with EnclosingMethod attribute.
The above issue was made explicit using the dx tool for the Android SDK
to convert Java bytecode to Dalvik bytecode.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ScriptRunner.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ScriptRunner.scala | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/compiler/scala/tools/nsc/ScriptRunner.scala b/src/compiler/scala/tools/nsc/ScriptRunner.scala index c8085e58a1..a3a04e34b9 100644 --- a/src/compiler/scala/tools/nsc/ScriptRunner.scala +++ b/src/compiler/scala/tools/nsc/ScriptRunner.scala @@ -236,11 +236,11 @@ object ScriptRunner { */ private def runCompiled( settings: GenericRunnerSettings, - compiledLocation: String, - scriptArgs: List[String]): Boolean = - { - val pr = new PathResolver(settings) - val classpath = File(compiledLocation).toURL +: pr.asURLs + compiledLocation: String, + scriptArgs: List[String]): Boolean = + { + val pr = new PathResolver(settings) + val classpath = File(compiledLocation).toURL +: pr.asURLs ObjectRunner.runAndCatch(classpath, scriptMain(settings), scriptArgs) match { case Left(ex) => ex.printStackTrace() ; false @@ -255,13 +255,13 @@ object ScriptRunner { */ def runScript( settings: GenericRunnerSettings, - scriptFile: String, - scriptArgs: List[String]): Boolean = - { - if (File(scriptFile).isFile) - withCompiledScript(settings, scriptFile) { runCompiled(settings, _, scriptArgs) } - else - throw new IOException("no such file: " + scriptFile) + scriptFile: String, + scriptArgs: List[String]): Boolean = + { + if (File(scriptFile).isFile) + withCompiledScript(settings, scriptFile) { runCompiled(settings, _, scriptArgs) } + else + throw new IOException("no such file: " + scriptFile) } /** Calls runScript and catches the enumerated exceptions, routing @@ -269,11 +269,11 @@ object ScriptRunner { */ def runScriptAndCatch( settings: GenericRunnerSettings, - scriptFile: String, - scriptArgs: List[String]): Either[Throwable, Boolean] = - { - try Right(runScript(settings, scriptFile, scriptArgs)) - catch { case e => Left(unwrap(e)) } + scriptFile: String, + scriptArgs: List[String]): Either[Throwable, Boolean] = + { + try Right(runScript(settings, scriptFile, scriptArgs)) + catch { case e => Left(unwrap(e)) } } /** Run a command @@ -283,8 +283,8 @@ object ScriptRunner { def runCommand( settings: GenericRunnerSettings, command: String, - scriptArgs: List[String]) : Boolean = - { + scriptArgs: List[String]): Boolean = + { val scriptFile = File.makeTemp("scalacmd", ".scala") // save the command to the file scriptFile writeAll command |