<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ryan Joseph <<a href="mailto:genericptr@gmail.com">genericptr@gmail.com</a>> schrieb am Mo., 10. Juni 2019, 20:35:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jun 10, 2019, at 2:21 PM, Sven Barth via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-devel@lists.freepascal.org</a>> wrote:<br>
> <br>
> There exist only two assignment operators, namely "Implicit" (aka := in mode ObjFPC) and "Explicit" both taking a single argument. Introducing a binary operator does not change that the operator is forbidden for classes. <br>
> <br>
> <br>
> I just tried this right now and I didn’t an error but it was indeed not overloaded and never got called. A bug?<br>
> <br>
> operator := (left, right: TObject): TObject;<br>
> begin<br>
> writeln('custom :=');<br>
> end;<br>
> <br>
> var<br>
> c: TObject;<br>
> begin<br>
> c := TObject.Create;<br>
> end.<br>
> <br>
> Did you try with trunk? Cause I fixed something related to that a few weeks ago. <br>
> <br>
<br>
Yeah in trunk it says impossible overload for equal types.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">As it should. </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>