[Issue 17354] New: An overload in a final class can silently hide base methods
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 26 12:37:59 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17354
Issue ID: 17354
Summary: An overload in a final class can silently hide base
methods
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
Try this:
final class Foo
{
bool opEquals(const Object) const {return true;}
}
void main(){}
Then this:
class Foo
{
bool opEquals(const Object) const {return true;}
}
void main(){}
In the first case the hijacking is detected. in the second, everything compiles
finely. This is why jenkins test failed here:
https://github.com/dlang/dmd/pull/6731#issuecomment-297327652
--
More information about the Digitalmars-d-bugs
mailing list