[fpc-devel]Another minor problem (1.1)

Michael Van Canneyt michael.vancanneyt at wisa.be
Mon Feb 4 11:36:11 CET 2002

On Mon, 4 Feb 2002, [Windows-1251] Ï.Â.Îçåðñêèé wrote:

> Hello,
> When I tried compile my program, I got an error message
> (Error: Property can't have a default value) although the same source
> was compiled with Delphi 3.0 successfully.
> Example:
>   property CurrentRecord:tRecord read GetCurrentRecord write SetCurrentRecord default nil;
> where tRecord is declared as a class.

For a class property, the default is always nil so you can drop the default in
the above declaration. Since you cannot declare a constant class, you also cannot
refer to it in a 'default' class, hence the error.

But for compatibility's sake, we should fix this.


More information about the fpc-devel mailing list