mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 06:08:22 +02:00

If these constants are defined with an explicit type, they are already truncated/checked at that point. If we range check them again on use, we may get errors because at that point there is no explicit type cast any more.
24 lines
274 B
ObjectPascal
24 lines
274 B
ObjectPascal
{ %norun }
|
|
|
|
|
|
{$r+}
|
|
|
|
{$mode delphi}
|
|
|
|
type
|
|
TLanguages = (
|
|
lOne,
|
|
lTwo,
|
|
lThree,
|
|
lFour
|
|
);
|
|
|
|
const
|
|
LANGUAGE_NONE = TLanguages(255);
|
|
var
|
|
Lang: TLanguages;
|
|
|
|
begin
|
|
Lang := LANGUAGE_NONE; //line 20
|
|
end.
|