[fpc-pascal] Release of fpc-2.1.4 aka 2.2.0-beta
bartek
bbartek at gmx.net
Sun May 20 14:47:53 CEST 2007
Hi,
I tried to compile my current project with the new compiler (2.1.4). This
resulted in the following error:
-----8<-----
/home/bartek/Dev/units/vmath.pp(435,29) Error: Can't take the address of
constant expressions
-----8<-----
-----8<-----
destructor TLazyVariableManager.Destroy;
var
i: integer;
begin
for i:=0 to LazyVariableList.count -1 do
TLazyVector4(LazyVariableList.items[i]).Free;
freeandnil(LazyVariableList); // <-- 435 is here
end;
-----8<-----
The definition is:
-----8<-----
TLazyVariableManager = class
private
fLazyVariableList: TFPList;
public
constructor Create;
destructor Destroy; override;
procedure run;
// properties
property LazyVariableList: TFPList read fLazyVariableList write
fLazyVariableList;
end;
-----8<-----
Seems like the handling of properties has changed. Replacing with
FLazyVariableList helps of course, but then again I get the same error here:
-----8<-----
/home/bartek/Dev/units/glgui/glgui.pp(376,26) Error: Can't take the address of
constant expressions
-----8<-----
constructor TGLGUI3DMouseMapper.Create(aOwnerDesktop: TGLGUIDesktop);
begin
OwnerDesktop:=aOwnerDesktop;
OwnerDesktop.MouseMapper:=self; // 376 is here
end;
-----8<-----
Definition snippet:
-----8<-----
// properties
property OwnerDesktop: TGLGUIDesktop read fOwnerDesktop write
fOwnerDesktop;
-----8<-----
What are the changes in handling properties? And how do I have to change my
code to work again. Or what would be "the right thing" to do in my situation?
Thanks in advance
bartek
More information about the fpc-pascal
mailing list