[Issue 951] New: Missing line number: no constructor provided for a class derived from a class with no default constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 11 18:13:12 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=951

           Summary: Missing line number: no constructor provided for a class
                    derived from a class with no default constructor
           Product: D
           Version: 1.005
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com


----------
class Base {
    this(int x) {}
}

class Derived : Base {}
----------
mln_no_def_this.d: constructor mln_no_def_this.Derived.this no match for
implicit super() call in constructor
----------

Presumably, DMD tries to find a line number for the implicit default
constructor in Derived, but can't find one and so doesn't give one.  If a
constructor without a super call is supplied, then the same error occurs but
with a line number.

When no constructor has been defined, it should give an appropriate line
number, such as the line on which the class definition begins.  And perhaps a
slightly different error message

mln_no_def_this.d(5): class mln_no_def_this.Derived no match for implicit
super() call in implicit default constructor


-- 



More information about the Digitalmars-d-bugs mailing list