mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +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 -
27 lines
322 B
ObjectPascal
27 lines
322 B
ObjectPascal
{ %norun }
|
|
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
type
|
|
tc = class
|
|
private
|
|
f: integer;
|
|
procedure setf(const val: integer);
|
|
public
|
|
property prop: integer read f write setf;
|
|
end;
|
|
|
|
procedure tc.setf(const val: integer);
|
|
begin
|
|
f:=val;
|
|
end;
|
|
|
|
var
|
|
c: tc;
|
|
p: pointer;
|
|
begin
|
|
p := @c.prop;
|
|
end.
|