fpc/tests/tbf/tb0262.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

19 lines
226 B
ObjectPascal

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