mutating casts of non-pointer primitive types working