[Issue 2036] New: Hiding rules too restrictive
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 25 15:22:10 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2036
Summary: Hiding rules too restrictive
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
Consider:
class Base
{
void foo() {}
void foo(int) {}
}
class Derived : Base
{
override void foo(int) {}
}
When -w is enabled, the compiler complains that Derived.foo hides Base.foo. In
effect, the overriding function properly overrides the second foo in Base but
also hides the first foo.
Probably more permissiveness would be helpful in such cases.
--
More information about the Digitalmars-d-bugs
mailing list