FWIW, this kind of errors can be checked at parsing phase if we implement constant folding. I don't think that would matter in practice, though.