fpc/tests/webtbs/tw9551a.pp
Jonas Maebe 40247d2d87 * give an error when the typeinfo() function is called for an enumeration
whose base is not 0, or that has jumps in its value range (manits #9551)

git-svn-id: trunk@12960 -
2009-03-22 20:54:49 +00:00

18 lines
184 B
ObjectPascal

uses
TypInfo,sysutils;
type
tmy2enum = (e1,e2,e3,e4);
procedure Test;
begin
if (GetEnumName(TypeInfo(TMy2Enum), Ord(e3)) <> 'e3') then
halt(1);
end;
begin
Test;
end.