[Issue 12737] static constructor requires call of super constructor

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 13 00:54:02 PDT 2014


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

Robert Schadek <rburners at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Robert Schadek <rburners at gmail.com> ---
I was stupid here the problem occurs when

class A {
    this(int a) {
    }
}

class B : A {
    static @trusted this() {
    }

        this() { super(1); }
}

void main() {
    auto n = new B();
}

 Error: constructor staticctor.B.this no match for implicit super() call in
constructor

--


More information about the Digitalmars-d-bugs mailing list