<p><br>
Am 12.08.2016 16:52 schrieb "Luca Olivetti" <<a href="mailto:luca@ventoso.org">luca@ventoso.org</a>>:<br>
><br>
> I'm still using fpc 2.6.4 (but I tested what I'm saying below with fpc 3.0.0 too).<br>
><br>
> I need to overload the type of the index of an indexed property, e.g.<br>
><br>
> function GetMyProp(index:integer):TMyPropType;<br>
> function GetMyProp(index:TMyType):TMyPropType;<br>
> ....<br>
> property MyProp[index:integer]:TMyPropType read GetMyProp;<br>
> property MyProp[index:TMyType]:TMyPropType read GetMyProp;<br>
><br>
><br>
> this gives a "Duplicate identifier" error.<br>
><br>
> I found previous discussions about this error and <a href="http://bugs.freepascal.org/view.php?id=29056">http://bugs.freepascal.org/view.php?id=29056</a><br>
><br>
> *but* if I omit the second property declaration, the code compiles fine and I can use MyProp indexed either by an integer or by TMyType.<br>
><br>
> Is this by design or is it just an accident?</p>
<p>Accident.</p>
<p>Regards,<br>
Sven</p>