[Gambas-user] Fixing bug tracker issue 78

Benoît Minisini gambas at ...1...
Wed Aug 31 03:05:31 CEST 2011


> On Wed, 2011-08-31 at 01:56 +0200, Benoît Minisini wrote:
> > Hi,
> > 
> > To finish fixing issue #78, in revision #4064, I have added a new check
> > in the Gambas inheritance mechanism.
> > 
> > Now, a class method can override a method of a parent class only if they
> > have the same signature.
> > 
> > The check is not done for the "_new" special method, as the inheritance
> > of _new is special (see "inheritance and constructor" in the "Gambas
> > object model" documentation on the wiki).
> > 
> > And the check is not done too for a native class inheriting another
> > native class. C/C++ programmer are supposed to know what they are doing.
> > :-)
> > 
> > Maybe you will get new "Badly overridden" errors in your projects now.
> > Sorry for that!
> > 
> > Regards,
> 
> I am having a panic attack over this as I thought it had gone away. Does
> this mean that gambas 3 is now explicitly non-polymorphic?
> Bruce

No, that means that a method signature cannot be changed through inheritance. 
Gambas was never polymorphic, and will not be.

-- 
Benoît Minisini




More information about the User mailing list