fpc/tests/tbf/tb0211a.pp
Jonas Maebe 3a8b29be91 + test conversion from class to differently sized enum and to differently
sized integer (succeed for Delphi, fail for objfpc)
  * fixed compiler so it only allows typecasting a class/interface to a
    differently sized integer in Delphi mode

git-svn-id: trunk@13152 -
2009-05-16 11:07:09 +00:00

14 lines
217 B
ObjectPascal

{ %fail }
// check whether integers can NOT be casted to object references; this
// should NOT work in objfpc mode (see also tbs/tb0554.pp)
{$mode objfpc}
var
i : Word;
o : TObject;
begin
i := Word(o);
end.