Using the ** operator in a constant expression on the left-hand side of an assignment currently triggers an error during codegen, complaining about ** not being supported on non-constants. This is due to the fact that codegen is called on the MIR of the expression, which immediately tries to emit LLHD instructions. What should actually happen is that whenever MIR is asked to be emitted, the compiler should try to constant-fold, thus eliminating the need for lots of redundant instructions.
Using the
**
operator in a constant expression on the left-hand side of an assignment currently triggers an error during codegen, complaining about**
not being supported on non-constants. This is due to the fact that codegen is called on the MIR of the expression, which immediately tries to emit LLHD instructions. What should actually happen is that whenever MIR is asked to be emitted, the compiler should try to constant-fold, thus eliminating the need for lots of redundant instructions.