Hi. Why does this fail to compile with FPC 2.3.1? (from ZeosLib):
procedure TZExpression.SetTokenizer(Value: IZTokenizer);
var
Parser: TZExpressionParser;
begin
FTokenizer := Value;
TZExpressionParser(FParser).Tokenizer := Value; // <-- This line fails
end;FParser is declared as TObject and assigned a is a property of TZExpressionParser of type IZTokenizer that gives direct access to the field FTokenizer of the same class.
The error message says:
ZExpression.pas(479,20) Error: Can't take the address of constant expressionsI googled a little and found that this error message is associated to trying to use a property as a var parameter or to try to modify a member of a value returned by a property, but this isn't any of those cases. May the problem be the property is of an interface type?
Thanks,
Mario
