[fpc-pascal] Accessing static field using properties.

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Apr 12 13:08:43 CEST 2010


On 12 Apr 2010, at 13:00, Torsten Bonde Christiansen wrote:

> After spending a good deal of time trying to figure out why my  
> program crashed at runtime, I narrowed it down to accessing a static  
> field in a class through a property.
>
> Although there were no compile time warning/error the program  
> crashed the very instant i tried to access the static field through  
> a property.

This has been fixed in FPC 2.5.1: http://bugs.freepascal.org/view.php?id=16080

Note that you have to use "class property" rather than just "property"  
to access static fields (but again, that doesn't work either in FPC  
2.4.0).


Jonas



More information about the fpc-pascal mailing list