Open pchapin opened 3 months ago
Currently it is possible to use 'Last to specify the upper bound of a range based on some other type's upper bound like this:
typedef int T1 range 1 .. 10; typedef int T2 range 5 .. T1'Last;
However, the following does not work, and probably should for symmetry if nothing else (not to mention it might be useful):
typedef int T1 range 1 .. 10; typedef int T2 range T1'First .. 5;
Currently Mercury only allows the lower bound of a range to be a constant, not any form of identifier.
Currently it is possible to use 'Last to specify the upper bound of a range based on some other type's upper bound like this:
However, the following does not work, and probably should for symmetry if nothing else (not to mention it might be useful):
Currently Mercury only allows the lower bound of a range to be a constant, not any form of identifier.