[fpc-devel] bug or feature - more
Martin Frb
lazarus at mfriebe.de
Sun Feb 13 03:43:12 CET 2022
Should the below then work? (It currently does)
Note, using "TBar = class end;" inside TFoo => does not work (expected).
It creates a type TFoo.TBar.
But the "type Abc = TBar" >imports< the outer forward declaration.
Btw, the compiler also does not care which of the 2 procedure
declarations is used.
program Project1;
type
TBar = class;
Tfoo = class
type Abc = TBar;
Abc = class
procedure Sub;
end;
end;
{ Tfoo.Abc }
//procedure TBar.Sub;
procedure Tfoo.Abc.Sub;
begin
end;
begin
TBar.Create.Sub;
end.
More information about the fpc-devel
mailing list