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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to