Where exactly are the *=/+=/etc methods declared for the subclasses of AnyVal? I assume something special is done for these types because as a val those are invalid but as a var they are fine. Is this just yet more syntatic sugar ? I assume it is turning
a *= 5
into
a = a * 5
which obviously fails for a val. Is this intuition correct? I also assume it only attempts this for AnyVals?
Thanks :)