[Issue 4855] When a class has private override member function, the function requires no return value type

2012-01-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4855


yebblies  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||yebbl...@gmail.com
 Resolution||DUPLICATE


--- Comment #5 from yebblies  2012-01-30 16:53:57 EST ---
*** This issue has been marked as a duplicate of issue 3581 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4855] When a class has private override member function, the function requires no return value type

2010-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4855


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #4 from Don  2010-09-12 19:05:39 PDT ---
I think this is a duplicate of bug 3581.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4855] When a class has private override member function, the function requires no return value type

2010-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4855



--- Comment #3 from bearophile_h...@eml.cc 2010-09-12 11:14:20 PDT ---
I don't know what's going on, but I suggest to keep this bug report open.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4855] When a class has private override member function, the function requires no return value type

2010-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4855



--- Comment #2 from Haruki Shigemori  2010-09-12 09:55:48 
PDT ---
Thank you for your reply.
If this characteristic is a design of DMD, I will close this bug report.
What do you think that both look like asymmetry?

import std.stdio;
class Base
{
int f() {return 0;}
int g() {return 0;}
}
class Derived : Base
{
private override /+int+/ f() {return 1;} // accepts
public  override /+int+/ g() {return 1;} // rejects
}
void main() {}

main.d(10): Error: function main.Derived.g of type () overrides but is not
covariant with main.Base.g of type int()
main.d(10): Error: function main.Derived.g does not override any function

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4855] When a class has private override member function, the function requires no return value type

2010-09-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4855


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2010-09-12 07:59:36 PDT ---
I agree this looks a bit strange, and it may even lead to a few bugs, but here
DMD is acting as designed, so it's not a true bug.

When you use enum, override and few other things, DMD performs type inference,
so the explicit return type is not necessary.

So I presume this bug may be closed.

(If you think this D characteristic is leads to many bugs then this bug report
may be kept open, despite the probability of seeing it fixed is low.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---