[fpc-devel] [] property overloads

Ryan Joseph genericptr at gmail.com
Mon Jul 8 16:10:40 CEST 2019


I just encountered something to consider. Should a property be overloadable if the names/args are the same but the return type is different? I think if they are not the same access type (i.e. read/write) then it could work (not sure about the parsing though) but if both are the same access then they should not be allowed.

======

property Values[key: variant]: TValue read GetValue; default;
property Values[key: variant]: variant write SetValue; default;

======

property Values[key: variant]: TValue read GetValue; default;
property Values[key: variant]: string read GetValue; default;

Regards,
	Ryan Joseph



More information about the fpc-devel mailing list