Lack of range checking when using enumerations or booleans in const declaration
Original Reporter info from Mantis: blimey
-
Reporter name: Geoffrey A Swift
Original Reporter info from Mantis: blimey
- Reporter name: Geoffrey A Swift
Description:
The const expressions in the below program are not valid, due to range checking. There should probably be a warning / error.
type abcd = (a, b, c, d);
type tt = True..True;
const cd: c..d = a;
const t: tt = False;
begin
end.
Steps to reproduce:
Compile the example program, note the lack of warnings / errors in relation to range checking.
Additional information:
A similar example using integers does produce a warning:
type abcd = 1..4;
const _34 : 3..4 = 1; // Warning: range check error while evaluating constants
begin
end.
Mantis conversion info:
- Mantis ID: 24428
- Version: 2.6.2
- Fixed in version: 3.0.0
- Fixed in revision: 24495 (#11d5d4f7)