Method hidding error

bearophile bearophileHUGS at lycos.com
Fri Jun 17 11:01:14 PDT 2011


yebblies (Daniel Murphy) is working a lot in squashing a lot of small bugs that were sleeping in Bugzilla, recently has created a pull request that turns "override" obligatory:
http://d.puremagic.com/issues/show_bug.cgi?id=3836

Time ago in Bugzilla I have put another similar "enhancement" request (but maybe this is not present in TDPL as the precedent one):
http://d.puremagic.com/issues/show_bug.cgi?id=4216

It asks this code to raise an error, currently it generates a warning:

class A {
  void foo(A a) {}
}
class B : A { // line 4
  void foo(B b) {}
}
void main() {}


What do you think?

Bye,
bearophile


More information about the Digitalmars-d mailing list