www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Method hidding error

reply bearophile <bearophileHUGS lycos.com> writes:
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
Jun 17 2011
parent reply "Daniel Murphy" <yebblies nospamgmail.com> writes:
"bearophile" <bearophileHUGS lycos.com> wrote in message 
news:itg4pa$22vc$1 digitalmars.com...
 What do you think?
This has already been fixed, it will give an error in the next release: testx.d(4): Error: class testx.B use of testx.A.foo(A a) hidden by B is deprecated
Jun 17 2011
parent reply bearophile <bearophileHUGS lycos.com> writes:
Daniel Murphy:

 This has already been fixed, it will give an error in the next release:
 
 testx.d(4): Error: class testx.B use of testx.A.foo(A a) hidden by B is 
 deprecated 
That bug report has to be closed then :-) If you want I will close it. You are doing lot of work in Bugzilla, thank you. Lately I have seen patches written by you for several small but annoying bugs, I hope to see most of those things fixed in dmd 2.054. If you look for things to fix, Don keeps a list of big important bugs, and I have a different list of little "bugs" (I think you have fixed two or more of them already). ------------- I think it's good to make the DMD hacking more accessible, creating a single HTML page that explains how to get the latest dmd sources, how submit patches, what are the main subsystems of DMD and how they interact. A second good HTML page to keep is a list, updated weekly, of bugs to fix, sorted in few groups, "very easy", "easy", "hard to fix", to offer something to do to newbies in DMD hacking. Bye, bearophile
Jun 18 2011
parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
"bearophile" <bearophileHUGS lycos.com> wrote in message 
news:iti6fa$318d$1 digitalmars.com...
 You are doing lot of work in Bugzilla, thank you. Lately I have seen 
 patches written by you for several small but annoying bugs, I hope to see 
 most of those things fixed in dmd 2.054.
 If you look for things to fix, Don keeps a list of big important bugs, and 
 I have a different list of little "bugs" (I think you have fixed two or 
 more of them already).
I already have my own list. (~200 bugs) This particular bug was not fixed by me though.
 I think it's good to make the DMD hacking more accessible, creating a 
 single HTML page that explains how to get the latest dmd sources, how 
 submit patches, what are the main subsystems of DMD and how they interact.
 A second good HTML page to keep is a list, updated weekly, of bugs to fix, 
 sorted in few groups, "very easy", "easy", "hard to fix", to offer 
 something to do to newbies in DMD hacking.
To be honest, I have mixed feelings about this. Setting up a dev environment for dmd shouldn't be too difficult for somebody who is planning to patch the compiler. There is already a guide up somewhere for submitting a pull request to phobos.
Jun 18 2011