<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Am Mo., 7. Jan. 2019, 15:55 hat Werner Pamler <<a href="mailto:werner.pamler@freenet.de">werner.pamler@freenet.de</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FPC trunk has not been very friendly to existing code recently...<br>
<br>
Today with r40792, the TAChart package fails to recompile: <br>
"tadiagram.pas(347,38) Error: Only static methods and static variables <br>
can be referenced through an object type". The faulty code is<br>
<br>
operator = (const A, B: TDiaPosition): Boolean;<br>
begin<br>
Result := TDiaPosition.Equals(A, B);<br>
end;<br>
<br>
where<br>
<br>
operator =(const A, B: TDiaPosition): Boolean; overload; inline;<br>
<br>
and<br>
<br>
type<br>
TDiaPosition = object<br>
public<br>
class function Equals(const A, B: TDiaPosition): Boolean;<br>
...<br>
<br>
The last revision with which this line compiles is r40784. The next one, <br>
r40785, committed yesterday by Jonas ("give an error when trying to call <br>
an object instance method via a type node"), introduces the new issue.<br>
<br>
What can I do to revive the package?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>