Am Mo., 7. Jan. 2019, 15:55 hat Werner Pamler <werner.pam...@freenet.de> geschrieben:
> 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? > 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. Regards, Sven >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel