www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 951] New: Missing line number: no constructor provided for a class derived from a class with no default constructor

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: smjg 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


-- 
Feb 11 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=951






Added to DStress as
http://dstress.kuehne.cn/nocompile/t/this_15_A.d


-- 
Mar 29 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=951


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD1.032


-- 
Jul 09 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=951






Fixed dmd 1.032 and 2.016


-- 
Jul 09 2008