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
Problem with updateDynamic:
\
If a dynamic field assignment is invoked within an expression (the type of the assignment invocation depends on the result type of method updateDynamic), then the compiler reports the error reassignment to val.
scala>valfoo=newA// A implements selectDynamic and updateDynamic
foo:A=A@71933d6c
scala> foo.xxx =3
foo.xxx:Any=3
scala> foo.xxx
res0:Any=3
scala> println(foo.xxx =3)
<console>:12:error: reassignment to val
println(foo.xxx =3)
^
scala>valx= (foo.xxx =3) == ()
<console>:11:error: reassignment to valvalx= (foo.xxx =3) == ()
^