high() and low() in conjunction with constant sets produce bogus results
Original Reporter info from Mantis: kays @KaiBurghardt
-
Reporter name: Kai Burghardt
Original Reporter info from Mantis: kays @KaiBurghardt
- Reporter name: Kai Burghardt
Description:
high() and low() do not evaluate as the lowest or highest possible element in a constant set.
Steps to reproduce:
program setLimits(input, output, stderr);
const
m = [0, 1, 2, 3];
t = high(m);
var
n: set of 0..3;
begin
writeLn(t); // prints 255 🙁
n := [0, 1];
writeLn(high(n)); // prints 3
end.
Mantis conversion info:
- Mantis ID: 35795
- OS: GNU/Linux
- OS Build: 4.2.0
- Platform: x86_64
- Version: 3.0.4