[fpc-pascal]Another FPC compiler bug

Johann Glaser Johann.Glaser at gmx.at
Fri Sep 8 20:09:35 CEST 2000


I'm just implementing an OOP wrapper for GTK+ in FPC and I found
something, which doesn't look good.

I've got a class "CButton", which has a "Constructor
Create(TheLabel:PGChar);". "CCheckButton", which is a descendant (one
class between) of "CButton", doesn't have this constructor but inherites

When I try to make an instance of "CCheckButton" with that constructor
"TButton := CCheckButton.Create('Display');", the compiler complains
that it wants to have an argument of type "PGtkObject" instead
"ShortString", because there is a "Constructor
Create(CastItem:PGtkObject);" directly in the CCheckButton class.

Shouldn't it be possible to make an instance of a desired class with
calling _any_ constructor, even the inherited?


Johann Glaser           <Johann.Glaser at gmx.at>
       Vienna University of Technology
            Electrical Engineering 

More information about the fpc-pascal mailing list