fpc/tests/webtbs/tw11859.pp
Jonas Maebe 5b08047d1c * allow exlicit type conversions from class/interface to enums in Delphi
mode (mantis #11859)
  * cleaned up some superfluous "eq=te_incompatible" checks (probably from
    copy/pasting conditions from elsewhere)

git-svn-id: trunk@13050 -
2009-04-26 20:41:24 +00:00

21 lines
222 B
ObjectPascal

{$ifdef fpc}
{$mode delphi}
{$endif}
{$z4}
type
tenum = (ea,eb,ec);
var
c1, c2: tobject;
e: tenum;
begin
{$r-}
c1:=tobject(pointer(12345));
e:=tenum(c1);
c2:=tobject(e);
if (c1<>c2) then
halt(1);
end.