scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Lazy vals aren't forced, which is good, but their value isn't printed if they are evaluated #60

Open dotta opened 12 years ago

dotta commented 12 years ago

It would be nice if after evaluation the evaluation of a is updated to the computed value, i.e., 2

object f {
  lazy val a = 2                              //> a : Int = <lazy>

  a + 2                                           //> res0: Int = 4
}