Michael Van Canneyt wrote:
This is the code:
TPressObject = class(TPressSubject)
_Id: TPressString;
private // <- compiler stops here
...
and this is the inheritance:
TPersistent (Classes unit)
+-TPressStreamable (PressClasses unit)
+-TPressSubject (PressSubject unit)
+-TPressObject (PressSubject unit)
+-TPressAttribute (PressSubject unit)
+-TPressString (PressSubject unit)
I also tried to move the member to the published area; declared the class
under the $M+ directive; but no success. Moving the _Id member to the
private area solves the compilation problem.
The problem is - TPressString is a forward declaration and the compiler
doesn't know that it inherits from TPersistent. Is this the expected behavior?
Yes.
The compiler has no idea that _Id is publishable, and therefor rejects it.
Thanks Michael.
But is this the correct behavior, a non implemented feature or a bug?
(note - Delphi doesn't raise this error)
--
Joao Morais
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal