[fpc-devel] [] property overloads

Ryan Joseph genericptr at gmail.com
Sat Jul 6 20:03:29 CEST 2019



> On Jul 6, 2019, at 12:14 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
> Why should this declaration not be allowed ?
> 
> Only the first GetValue() should be called, of course.
> 
> i.e. statement 1:
> A:=Values[MyVariant]
> must work
> 
> but e.g. statement 2:
> A:=Values[MyVariant1,MyVariant2]
> must not work.
> 
> Only if overloaded array properties are allowed
>   property Values[key: variant]: TJSON read GetValue; default;
>   property Values[key1,key2: variant]: TJSON read GetValue; default;
> may the second statement be accepted.

Yeah that’s correct. 

Here’s my bug report:

https://bugs.freepascal.org/view.php?id=35809

Regards,
	Ryan Joseph



More information about the fpc-devel mailing list