The Low and High functions allow an incorrect expression without errors
Original Reporter info from Mantis: SergeAnvarov @SergeAnvarov
-
Reporter name: Serge Anvarov
Original Reporter info from Mantis: SergeAnvarov @SergeAnvarov
- Reporter name: Serge Anvarov
Description:
For Low and High functions, you can specify expressions inside parentheses where types and constants are intermixed.
Steps to reproduce:
program Project1;
var
i: PtrInt;
begin
i := High(Byte div 1); // Equal High(i)
end;
Additional information:
For Low the same.
This can be Char + 'some', with {$LONGSTRINGS OFF}.
In Delphi, this causes a compilation error about the inadmissibility of using a type in an expression.
Mantis conversion info:
- Mantis ID: 32994
- Platform: Windows
- Version: 3.0.4
- Monitored by: » @KaiBurghardt (Kai Burghardt)