This page is no longer maintained — Please continue to the home page at www.scala-lang.org

2.9.0.1 <> 2.9.1.RC3 Interpreter regression

1 reply
daniel.kroeni
Joined: 2008-09-30,
User offline. Last seen 1 year 46 weeks ago.

Hi all,

I found an interpreter regression in 2.9.1.RC3. But maybe I'm just
doing it wrong with the new version.

dk@dkwork:~/Desktop/Test$ scala -version
Scala code runner version 2.9.0.1 -- Copyright 2002-2011, LAMP/EPFL
dk@dkwork:~/Desktop/Test$ cat InterpreterTest.scala
import tools.nsc.Settings
import tools.nsc.interpreter.IMain

object InterpreterTest {
def main(args: Array[String]) {
val settings = new Settings()
settings.usejavacp.value = true
val m = new IMain(settings)
m.interpret("val x = 42")
println(m.valueOfTerm("x"))
}
}

dk@dkwork:~/Desktop/Test$ scala -version
Scala code runner version 2.9.0.1 -- Copyright 2002-2011, LAMP/EPFL
dk@dkwork:~/Desktop/Test$ scala InterpreterTest.scala
x: Int = 42
Some(42) //THIS IS GOOD

////////////////// Now with scala 2.9.1.RC3

dk@dkwork:~/Desktop/Test$ ~/tools/scala-2.9.1.RC3/bin/scala -version
Scala code runner version 2.9.1.RC3 -- Copyright 2002-2011, LAMP/EPFL
dk@dkwork:~/Desktop/Test$ ~/tools/scala-2.9.1.RC3/bin/scala
InterpreterTest.scala
x: Int = 42
None // THIS IS NOT GOOD

BTW: Interpreter startup time is amazing now! Many thanks!

Daniel

daniel.kroeni
Joined: 2008-09-30,
User offline. Last seen 1 year 46 weeks ago.
Re: 2.9.0.1 <> 2.9.1.RC3 Interpreter regression

This issue has already been reported:
https://issues.scala-lang.org/browse/SI-4899

Sorry for the noise.

On Aug 19, 9:16 am, Daniel wrote:
> Hi all,
>
> I found an interpreter regression in 2.9.1.RC3. But maybe I'm just
> doing it wrong with the new version.
>
> dk@dkwork:~/Desktop/Test$ scala -version
> Scala code runner version 2.9.0.1 -- Copyright 2002-2011, LAMP/EPFL
> dk@dkwork:~/Desktop/Test$ cat InterpreterTest.scala
> import tools.nsc.Settings
> import tools.nsc.interpreter.IMain
>
> object InterpreterTest {
>   def main(args: Array[String]) {
>     val settings = new Settings()
>     settings.usejavacp.value = true
>     val m = new IMain(settings)
>     m.interpret("val x = 42")
>     println(m.valueOfTerm("x"))
>   }
>
> }
>
> dk@dkwork:~/Desktop/Test$ scala -version
> Scala code runner version 2.9.0.1 -- Copyright 2002-2011, LAMP/EPFL
> dk@dkwork:~/Desktop/Test$ scala InterpreterTest.scala
> x: Int = 42
> Some(42)   //THIS IS GOOD
>
> ////////////////// Now with scala 2.9.1.RC3
>
> dk@dkwork:~/Desktop/Test$ ~/tools/scala-2.9.1.RC3/bin/scala -version
> Scala code runner version 2.9.1.RC3 -- Copyright 2002-2011, LAMP/EPFL
> dk@dkwork:~/Desktop/Test$ ~/tools/scala-2.9.1.RC3/bin/scala
> InterpreterTest.scala
> x: Int = 42
> None  // THIS IS NOT GOOD
>
> BTW: Interpreter startup time is amazing now! Many thanks!
>
> Daniel

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland