You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one tries to update a value in a Map by calling its corresponding setter, the REPL throws an error:
scala>caseclassX(varx:Int)
defined classX
scala>valm=Map('x->X(1))
m: scala.collection.immutable.Map[Symbol,X] =Map('x->X(1))
scala> m('x).x =7
<console>:10:error: ')' expected but string literal found.
+"m(scala.Symbol("x")).x: Int = "+ `$ires0` +"\n"
^
This error occurs both in a nightly version of 2.10 and in 2.9.2, but in the latter no error message is thrown. Using an explicitly typed setter, no error occurs:
scala> m('x).x_=(7)
scala> m
res1: scala.collection.immutable.Map[Symbol,X] =Map('x->X(7))
Furthermore, this error occurs only inside of the REPL, not by compiling/interpreting of a Scala source file.
The text was updated successfully, but these errors were encountered:
If one tries to update a value in a Map by calling its corresponding setter, the REPL throws an error:
This error occurs both in a nightly version of 2.10 and in 2.9.2, but in the latter no error message is thrown. Using an explicitly typed setter, no error occurs:
Furthermore, this error occurs only inside of the REPL, not by compiling/interpreting of a Scala source file.
The text was updated successfully, but these errors were encountered: