[fpc-pascal] Class reference doubt
    Jonas Maebe 
    jonas.maebe at elis.ugent.be
       
    Wed Nov 23 22:56:20 CET 2011
    
    
  
On 23 Nov 2011, at 22:48, Jesus Reyes wrote:
> in the following example The output is:
> cls class is TFoo
> TObj.create
> 
> where I would expect:
> cls class is TFoo
> TObj.create
> TFoo.create
> 
> ie the TFoo.constructor is not called, is this normal/expected?
Yes. You have to use a virtual constructor if you wish to override in a child class, just like with regular methods and class methods.
Jonas
    
    
More information about the fpc-pascal
mailing list