[Bug 91] New: Inherited classes require base class to have a default constructor.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 6 21:46:44 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=91

           Summary: Inherited classes require base class to have a default
                    constructor.
           Product: D
           Version: 0.152
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: eric96 at gmail.com


Let me know if this is expected behavior or some rule I don't know about, but I
think it's a bug.  If you insert the default constructor "this(){}" in A, it
compiles fine.

// Looks like it requires the base class to have a default constructor.
class A
{  this (int i) // constructor yage.a.this(int) does not match argument types
()
   {}
}
class B : A
{  this (int i)
   {}
}

Also, Windows XP SP2; Haven't tried it on Linux yet.


-- 




More information about the Digitalmars-d-bugs mailing list