I added support for arithmetic in constant expressions containing lvars that can be used only in bounds for the present.
There is a case for adding the constant expressions elsewhere, such as in arguments to method invocation, and to class and lvar constructors. I did not add those at present because I wanted to minimise the changes. Before making constant expressions more widespread, we should decide where we want them to be used, and what other primitives we may want to add beyond +,-,*,/
I added support for arithmetic in constant expressions containing lvars that can be used only in bounds for the present. There is a case for adding the constant expressions elsewhere, such as in arguments to method invocation, and to class and lvar constructors. I did not add those at present because I wanted to minimise the changes. Before making constant expressions more widespread, we should decide where we want them to be used, and what other primitives we may want to add beyond +,-,*,/