[fpc-devel] Failure to recompile TAChart after FPC r40785 (committed by Jonas)

Werner Pamler werner.pamler at freenet.de
Mon Jan 7 15:47:07 CET 2019


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;
     begin
       Result := TDiaPosition.Equals(A, B);
     end;

where

   operator =(const A, B: TDiaPosition): Boolean; overload; inline;

and

    type
       TDiaPosition = object
       public
        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?





More information about the fpc-devel mailing list