mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 04:28:25 +02:00

case the getter is a function, the result is that first the getter is called, and subsequently the temp holding the function result is overwritten (thus not changing anything). This is Delphi-compatible, and fixes tests/tbf/tb0214* git-svn-id: trunk@13320 -
24 lines
363 B
ObjectPascal
24 lines
363 B
ObjectPascal
{ %fail }
|
|
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
type
|
|
tc = class
|
|
private
|
|
fl: longint;
|
|
public
|
|
property l: longint read fl write fl;
|
|
end;
|
|
|
|
var
|
|
c: tc;
|
|
begin
|
|
{ should give an error stating that you cannot assign to left hand side }
|
|
{ (generated code also does not result in an assignment) }
|
|
cardinal(c.l):=cardinal(5);
|
|
end.
|
|
|
|
|