blob: fb2f43ea56eeba993153b094c31038b83e9a517d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// check whether enums and integers can be casted to object references; this
// should work in Delphi mode (is Delphi compatible)
{$mode delphi}
{$packenum 2}
type
TEnum = (a, b, c);
var
i : Word;
e : TEnum;
o : TObject;
begin
o := TObject(e);
o := TObject(i);
i := Word(o);
e := TEnum(o);
end.
|