[fpc-devel] strict keyword or not ? (strict private )

martin fpc at mfriebe.de
Sun Jun 7 18:40:56 CEST 2009


I just discovered that the following compiles (at least on trunc) (both
delphi and objpas mode)

type
  TFoo = class
  strict private
    FBar: Integer;
  end;

However I found no mention on the docs?
http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refse30.html#x66-740006.1

Problem is:

while you can have global or local (in procedures) variables called 
"strict" (and also procedure/functions/methods of theis name) you get an 
error if you try to declare

type
  TFoo = class
  private
    strict : boolean;
  end;

That is somewhat inconsistent, if strict is allowed as an identifier 
name, then it should be allowed anywhere?


quick question: Which Fpc version was that added? (or did I
simply miss it until now)

Thanks
Martin





More information about the fpc-devel mailing list