Re: [fpc-devel] [] property overloads

2019-06-21 Thread Ryan Joseph
Can anyone test this to see if it’s ok? Not sure I got everything correct and I still need some new error messages that make more sense (see the writeln’s I left in) Even though overloads are allowed the actual name isn’t overloaded so you MUST access without the name to get overloading

Re: [fpc-devel] [] property overloads

2019-06-21 Thread Sven Barth via fpc-devel
Marcus Marques da Rocha schrieb am Fr., 21. Juni 2019, 12:24: > It is possible to do that using variant type. I have done it as below: > Though this is not very type safe. So a correct solution in the compiler for overloading is definitely desired. Regards, Sven >

Re: [fpc-devel] [] property overloads

2019-06-21 Thread Marcus Marques da Rocha
It is possible to do that using variant type. I have done it as below: property DocumentElementChildNodes[Index1: Variant] : TPXMLNode read getChildNode; default; function TPXMLNode.getChildNode(Index1 : Variant): TPXMLNode; begin   Result := nil;   if assigned(Self) and assigned(FChildNodes)