On Sat, 10 Oct 2015, Ondrej Pokorny wrote:

Oh, it would be so nice if default enumerator wasn't defined with the "GetEnumerator" function but with the default property:

 TTest = class
   // ...
   function GetObjectEnumerator: TTestObjectEnumerator;
property Objects[Index: Integer]: TObject read GetObject enumerator GetObjectEnumerator; default;
 end;

In this case the default enumerator would always correspond with the default property. Now they can be completely different. But Embarcadero already made the decision, so it doesn't matter :(

The class does not need to have a default property to begin with, so it is 
somewhere logical.

Michael.
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to