[fpc-devel] "class of TFoo".Create

J. Gareth Moreton gareth at moreton-family.com
Sun Jul 6 16:52:15 CEST 2025


Going by what Martin just said, should this throw a warning, at least if 
not in Delphi mode?  Or an error?  This "feature" being used is more 
likely due to a programming bug and I feel that the developer's 
attention should be drawn to it so it can be replaced with TFoo.Create 
if that's what they meant, or a metaclass variable.

Kit

On 06/07/2025 15:41, Marco van de Voort via fpc-devel wrote:
>
> Op 6-7-2025 om 16:31 schreef J. Gareth Moreton via fpc-devel:
>> What I mean is that if you want to instantiate an object of class 
>> TFoo, you'd call TFoo.Create, not TFooClass.Create.
>
> I also don't see the real value of that "feature", but iirc it was 
> added since Delphi allows it.
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>

-- 
This email has been checked for viruses by Avast antivirus software.
www.avast.com


More information about the fpc-devel mailing list