[fpc-devel] Issue with class vars
Birger Jansen
birger at cnoc.nl
Wed Oct 27 10:46:38 CEST 2010
Hi,
I encountered a possible bug (or at least a compiler error that should be clearified) when using class vars in FPC 2.4.3:
This class definition will compile:
TTest = class(TObject)
private
FMyField: string;
class var MyClassVar: Integer;
published
property MyProperty: string read FMyField write FMyField;
end;
When swapping the rows with class var and FMyField it becomes this:
TTest = class(TObject)
private
class var MyClassVar: Integer;
FMyField: string;
published
property MyProperty: string read FMyField write FMyField;
end;
This breaks the code, but on a strange line: the line property MyProperty (...) with Error: Illegal symbol for property access.
Shall I report a bug for this?
Kind regards,
Birger Jansen
More information about the fpc-devel
mailing list