Fix lval extension for compressed assignment in constant function.
Fix lval extension for compressed assignment in constant function.

The type of extension (zero/sign) is determined by the expression
type, not the operand type, so we need to cast to the expression
type before extending the value.

themperek/iverilog,themperek/iverilog,themperek/iverilog