[Issue 2539] New: Base class methods are not envolved in interface methods implementation resolution
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 22 16:55:23 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2539
Summary: Base class methods are not envolved in interface methods
implementation resolution
Product: D
Version: 2.022
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: 2korden at gmail.com
Here is the code:
class A
{
int b() { return 42; }
}
interface B
{
int b();
}
class C : A, B
{
// test.d(13): class test.C interface function B.b is not implemented
}
While it is usually not an issue, since you can simply add "int b() { return
super.b(); }" to class C, it is not in my case:
class A
{
final int b() { return 42; } // note the 'final'
}
interface B
{
int b();
}
class C : A, B
{
int b() {
return super.b();
}
}
test.d(15): function test.C.b cannot override final function test.A.b
I believe this needs to be discussed.
--
More information about the Digitalmars-d-bugs
mailing list