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

Why does the Scala REPL behave this way?

No replies
Seth Tisue
Joined: 2008-12-16,
User offline. Last seen 34 weeks 3 days ago.

in 2.7, 2.8, and 2.9 alike:

scala> 2
res0: Int = 2

scala> { 2; 3 }
res1: Int = 3

so far so good, but then:

scala> 2; 3

scala> val a = 2; 3
a: Int = 2

Hey REPL, where'd my 3's go?

(Should I open a ticket?)

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