[fpc-devel] is that intended? private type section in classes versus visibility

Martin lazarus at mfriebe.de
Fri Jul 23 03:10:28 CEST 2010


Since it now is possible to define types inside a class,
please look at the example below.

the class internal type section continues accross the border of the 
visibility "protected" => an error is given that after the "f" a "=" was 
expected (as needed for a new type "f")

Is that intended? Or should a visibility change exit  the type section?


program Project1;
{$mode objfpc}{$H+}

type
   Tfoo=class
   private
     type
       TF = (one,two,three);
//    var // enable this and it works
   protected
     f: TF;
   end;

begin
end.




More information about the fpc-devel mailing list