[fpc-devel] Failure to recompile TAChart after FPC r40785 (committed by Jonas)
pascaldragon at googlemail.com
Mon Jan 7 17:13:21 CET 2019
Am Mo., 7. Jan. 2019, 15:55 hat Werner Pamler <werner.pamler at freenet.de>
> FPC trunk has not been very friendly to existing code recently...
> Today with r40792, the TAChart package fails to recompile:
> "tadiagram.pas(347,38) Error: Only static methods and static variables
> can be referenced through an object type". The faulty code is
> operator = (const A, B: TDiaPosition): Boolean;
> Result := TDiaPosition.Equals(A, B);
> operator =(const A, B: TDiaPosition): Boolean; overload; inline;
> TDiaPosition = object
> class function Equals(const A, B: TDiaPosition): Boolean;
> The last revision with which this line compiles is r40784. The next one,
> r40785, committed yesterday by Jonas ("give an error when trying to call
> an object instance method via a type node"), introduces the new issue.
> What can I do to revive the package?
Did you try to add "static" to the TDiaPosition.Equals class function? For
an object type only instance and static class methods make sense so non
static class methods should probably best be forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel