On Sun, Jul 6, 2025 at 1:57 PM Martin Frb via fpc-devel
<fpc-devel@lists.freepascal.org> wrote:


> program Project1;
> {$mode objfpc}
> type TFoo = class end;
>       TFooClass = class of TFoo;
> var f: TFoo;
>      fc: TFooClass;
> begin
>    fc := TFoo;
>    f  := fc.Create;
>    f  := TFooClass.Create;  // works
> end.

Delphi (7) happily compiles that as well.
And f is of type TFoo there as well.

-- 
Bart
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to