Scala Language Dynamic Invocation Interaction Between Field Access and Update Method


Example

Slightly counterintuitively (but also the only sane way to make it work), this:

val dyn: Dynamic = ???
dyn.x(y) = z

is equivalent to:

dyn.selectDynamic("x").update(y, z)

while

dyn.x(y)

is still

dyn.applyDynamic("x")(y)

It is important to be aware of this, or else it may sneak by unnoticed and cause strange errors.