We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
If one tries to update a value in a Map by calling its corresponding setter, the REPL throws an error:
scala> case class X(var x: Int)
defined class X
scala> val m = 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:
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:
Imported From: https://issues.scala-lang.org/browse/SI-6549?orig=1
Affected Versions: 2.9.2, 2.10.0
Sorry, something went wrong.
No branches or pull requests