[fpc-pascal]forward declaration of classes
Peter Vreman
peter at freepascal.org
Thu Jan 17 16:55:17 CET 2002
> On Thu, 17 Jan 2002 15:28:41 GMT
> Peter Vreman <peter at freepascal.org> wrote:
>
> > > Hi all,
> > >
> > > If I forward define a class, e.g. 'TMyForwardClass = class;', in the interface
section
> > and
> > put the real definition in the implementation section, the compiler gives a
> > >
> > > test1.pas(144) Warning: test1.ppu Interface CRC changed 1718528929<>2054119697
> > >
> > > but it compiles.
> > > I'm not sure if this is wanted. Definitions in the implementation section should not
be
> > visible, but this way I could use the class internals of TMyForwardClass in an another
> > unit, as if the class is defined completely in the interface section.
> > >
> > > What is the bug and what should be the right behaviour?
> > >
> > > I think, bug 1599 is something similar.
> >
> > I guess it's a bug, but what does Delphi give?
>
> Test1.pas(9): Type 'TMyForwardClass' is not yet completely defined
Then it's for sure a bug ;)
More information about the fpc-pascal
mailing list