[fpc-pascal] Wrong constructor returning the right object

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Feb 23 17:47:48 CET 2014


Marco van de Voort wrote:
> In our previous episode, Mark Morgan Lloyd said:
>>>> I didn't think this was necessary, 
>>> _why_ did you think this?
>> In part, because the documentation on method declarations at 
>> http://www.freepascal.org/docs-html/ref/refsu25.html#x66-730005.5.1 
>> explicitly allows a  virtual  method directive, but the documentation on 
>> constructor declarations at 
> 
> That link also contains a case for constructors, but point taken, the
> railroad diagram of constructor could be improved, which might be worthy of
> a bugreport.

"Railroad diagram"- I've not heard it called that since I worked for the 
Yanks :-) Bugreported as http://mantis.freepascal.org/view.php?id=25770

I also note the comment about classes with virtual methods /having/ to 
have an explicit constructor and destructor: does this apply to classes 
that have *override* methods or only to parent classes with one or more 
*virtual* methods?

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list