[fpc-devel] class of nested.class ?

Sven Barth pascaldragon at googlemail.com
Fri Apr 4 08:03:47 CEST 2025


Martin Frb via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Do.,
3. Apr. 2025, 21:35:

> "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.
>

Parsing unit names is different from parsing type names. Please report a
bug.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20250404/345d355c/attachment.htm>


More information about the fpc-devel mailing list