<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., 8. Juli 2019, 18:04:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jul 8, 2019, at 11:07 AM, 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>
> As Pascal does not allow differentiating between result types this indeed needs to be/stay forbidden. <br>
> <br>
<br>
There actually is a need to distinguish between getters/setters but the way property syntax works we’re forced for the return type to be the same as the input for the setter. This is a problem I faced before where I want the getter to return a pointer but I want the setter to take a direct value.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Well, in theory you could use a read only index property that returns a pointer and a write only index property that takes the type as is. </div><div dir="auto">But overloading only based on the result type is not supported.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>