[Gambas-user] Big incompatible change

Benoît Minisini gambas at ...1...
Sun Aug 21 02:15:47 CEST 2011


> 2011/8/19 Benoît Minisini <gambas at ...1...>:
> > To fix the bug tracker issue #78, I had to do some incompatible changes.
> > 
> > But now, changing the return datatype of a method through inheritance is
> > now correctly forbidden.
> > 
> > Theoretically, I have to prevent method signature from changing between
> > inheritance too. But it is more complex to do that, so it will come
> > later.
> > 
> > I hope that it won't break your projects too much.
> 
> So, the signature and the return value of a method in a sub-class
> should be identical to the method in its super-class.
> 
> If some of them is different in the sub-class, then the method on the
> sub-class is a new one, not the redefinition of the method on the
> super-class, ¿right?

No, because a method is only identified by its name, not by its signature.

-- 
Benoît Minisini




More information about the User mailing list