[fpc-devel] class of nested.class ?

Martin Frb lazarus at mfriebe.de
Thu Apr 3 21:35:05 CEST 2025


"class of" can use qualified identifiers. It works with "unit.classname".

But it can't be used on a class nested in another container?
(same if TFoo is advanced record)

Is that intentional?

program Project1;
type
   TFoo = class
   public type
     TBar = class end;
   end;

   TFooClass = class of Project1.TFoo;
   TBarClass = class of TFoo.TBar;  /// <<<<<<< ERROR

begin

end.



More information about the fpc-devel mailing list