cast_value: assign the new type The first two arguments of cast_value() are the new expression and the type wanted for it. This type is then used to calculate the new value. But the type of the expression must be assigned separately (usually after the cast because the old and the new expression can refer to the same object). To avoid any possible inconsistencies, assign the new type during the casting itself. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>