www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12737] New: static constructor requires call of super


          Issue ID: 12737
           Summary: static constructor requires call of super constructor
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: rburners gmail.com

class A {
    this(int a) {

class B : A {
    static this() {

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

fails to compile with: Error: class staticctor.B Cannot implicitly generate a
default ctor when base class staticctor.A is missing a default ctor

IMO that is wrong. A has no static ctor nor static members.

May 12 2014