[Issue 2525] Can't use `override` when implementing abstract base class's interface function
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 9 05:29:56 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=2525
--- Comment #14 from Martin Nowak <code at dawg.eu> ---
As a workaround one can redeclare the interface methods in the abstract class.
----
interface I
{
void foo();
}
abstract class A : I
{
override void foo();
}
class B : A
{
override void foo () {}
}
----
Note that this bug and the workaround also applies to implicit abstract
classes.
----
interface I
{
void foo();
}
class A : I
{
abstract override void foo();
}
class B : A
{
override void foo () {}
}
----
--
More information about the Digitalmars-d-bugs
mailing list