[Issue 13690] Curiously Recurring Template Pattern

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 22 14:26:40 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=13690

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
Running the example on dmd 2.078.0 Ubuntu 16.04 results in :

test.d(27): Error: class `test.Foo1` interface function void do_a_thing() is
not implemented
test.d(31): Error: class `test.Foo2` interface function void do_a_thing() is
not implemented
test.d(31): Error: class `test.Foo2` interface function double rotation()
@property is not implemented

So the real problem here is this: (reduced test case)

interface A
{
    void x();
}

interface B : A
{
    final void x() { } 
}

class C : B 
{
    //override void x() {}
}

If the method in C is commented you will get error stating that you are not
implementing x. If you uncomment you will get an error stating that you cannot
override final method. That's the real bug. Changing the title to reflect that

--


More information about the Digitalmars-d-bugs mailing list