fpc/tests/test/terecs8.pp
paul 210e78e4fa compiler: allow objects and records to have members which point to themself. only don't permit this to regular fields.
- remove testcurobject hack and perform a check only for regular fields
  - move is_holded_by to interface and rename it to is_owned_by
  - don't check static symbols in _needs_init_final because they always point to symbols registered on unit level
  - don't check object type in id_type, read_named_type when we are looking for type of structure member - the only check will be performed for record/object fields now
  + tests

git-svn-id: trunk@16646 -
2010-12-27 05:47:25 +00:00

22 lines
338 B
ObjectPascal

program terecs8;
{$mode delphi}
// allow refence owner type for record and object static fields and class properties
type
TFoo = record
class var
FFoo: TFoo;
class property Foo: TFoo read FFoo write FFoo;
end;
TBar = record
class var
FBar: TBar;
class property Bar: TBar read FBar write FBar;
end;
begin
end.