[Issue 19767] New: Classes that inherit from an interface can override static interface methods
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 27 13:34:38 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19767
Issue ID: 19767
Summary: Classes that inherit from an interface can override
static interface methods
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: edi33416 at gmail.com
This directly contradicts the interface
[spec](https://dlang.org/spec/interface.html), pt. 8:
"Classes that inherit from an interface may not override final or static
interface member functions."
interface D
{
void bar();
static void foo() { }
}
class C : D
{
void bar() { } // ok
void foo() { } // BUG: this is ok, but should error because we cannot
override static D.foo()
}
--
More information about the Digitalmars-d-bugs
mailing list