mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 13:59:28 +02:00
18 lines
261 B
ObjectPascal
18 lines
261 B
ObjectPascal
{ %fail }
|
|
|
|
// check whether enums can NOT be casted to object references; this
|
|
// should NOT work in objfpc mode (see also tbs/tb0554.pp)
|
|
{$mode objfpc}
|
|
|
|
{$packenum 2}
|
|
type
|
|
TEnum = (a, b, c);
|
|
|
|
var
|
|
e : TEnum;
|
|
o : TObject;
|
|
|
|
begin
|
|
o := TObject(e);
|
|
end.
|