fpc/tests/test/terecs9.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

21 lines
230 B
ObjectPascal

{ %fail}
program terecs9;
{$mode delphi}
// don't allow refence owner type for record and object fields and properties
type
TFoo = record
var
FFoo: TFoo;
end;
TBar = record
var
FBar: TBar;
end;
begin
end.