fpc/tests/tbf/tb0265.pp
svenbarth 251dfb6776 * don't allow constants of the record type that is currently being parsed; this would fail as soon as another field is added after the constant declaration
+ added tests
Note: unlike what bug report 27880 suggests Delphi also does *NOT* allow this (at least a current Delphi Tokyo) and fails with a "type is not completely defined" error, so this test belongs into the "failure" category

git-svn-id: trunk@40285 -
2018-11-11 22:08:29 +00:00

21 lines
255 B
ObjectPascal

{ %FAIL }
program tb0265;
{$mode objfpc}
{$modeswitch advancedrecords}
type
TTest = record
public
a, b: LongInt;
public const
Test: array of record
t: TTest;
end = ((t: (a: 42; b: 21)), (t: (a: 21; b: 42)));
end;
begin
end.