I'm still using fpc 2.6.4 (but I tested what I'm saying below with fpc 3.0.0 too).
I need to overload the type of the index of an indexed property, e.g.
function GetMyProp(index:integer):TMyPropType;
function GetMyProp(index:TMyType):TMyPropType;
....
property MyProp[index:integer]:TMyPropType read GetMyProp;
property MyProp[index:TMyType]:TMyPropType read GetMyProp;this gives a "Duplicate identifier" error.
I found previous discussions about this error and
http://bugs.freepascal.org/view.php?id=29056
*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.
Is this by design or is it just an accident?
I'm attaching a simple test program and apparently it does the "right thing".
Bye
