mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:49:31 +02:00

* do not allow assignments to fields of structured properties (e.g. property prop: trec read frec; ... instance.prop.frec.a:=5) * clarified some related error messages + several extra tests for the above and related things git-svn-id: trunk@7250 -
23 lines
229 B
ObjectPascal
23 lines
229 B
ObjectPascal
{ %fail }
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
type
|
|
tr = record
|
|
a: integer;
|
|
end;
|
|
|
|
tc = class
|
|
private
|
|
f: tr;
|
|
public
|
|
property prop: tr read f write f;
|
|
end;
|
|
|
|
var
|
|
c: tc;
|
|
begin
|
|
c.prop.a := 5;
|
|
end.
|