fpc/tests/tbf/tb0225.pp
svenbarth 359a228085 Fix one problem type of Mantis #23546. A record must not contain a static array that uses itself as an element type (in can contain a dynamic array however) otherwise an infinite loop is encountered when checking whether the record needs special init/final code.
pdecvar.pas, read_record_fields:
  * if the def of the field is a static array then use the array's element def (the final element def if it is a multi dimensional array) to check for whether this is the current record type

+ added tests

git-svn-id: trunk@23352 -
2013-01-09 14:07:01 +00:00

20 lines
197 B
ObjectPascal

{ %FAIL }
program tb0225;
{$modeswitch advancedrecords}
type
TTest = record
public type
TTestSub = record
f: TTest;
end;
public
f: array of TTestSub;
end;
begin
end.