fpc/tests/tbs/tb0693.pp
Jonas Maebe 3da54dcf9f Symbolic constants: don't range check on use
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.
2022-04-02 13:26:44 +02:00

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.