fpc/tests/webtbs/tw18768.pp
svenbarth 489e038379 Disallow "protected" and "strict protected" in extended records (Delphi compatible).
ptype.pas, parse_record_members:
  * write an error message if "protected" or "strict protected" is encountered
msg/errore.msg:
  + add an error message for disallowed "things" in records

+ added test
* adjusted test (note: according to the bug report this test did not originally have the "protected" section, but it was added by Paul before commiting)

git-svn-id: trunk@23596 -
2013-02-11 18:46:47 +00:00

27 lines
332 B
ObjectPascal

{ %norun}
program tw18768;
{$mode delphi}{$H+}
type
TFoo1 = record
private
type
TFoo3 = record
private
b, c: integer;
strict private
a: integer;
public
function GetFoo2: integer;
end;
end;
function TFoo1.TFoo3.GetFoo2: integer;
begin
c := a * b;
end;
begin
end.