Bug 951 – Missing line number: no constructor provided for a class derived from a class with no default constructor

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-02-11T20:13:00Z
Last change time
2014-02-16T15:25:44Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
smjg

Comments

Comment #0 by smjg — 2007-02-11T20:13:06Z
---------- 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
Comment #1 by thomas-dloop — 2007-03-29T14:30:23Z
Comment #2 by clugdbug — 2008-07-09T07:11:42Z
Fixed DMD1.032
Comment #3 by bugzilla — 2008-07-09T22:37:31Z
Fixed dmd 1.032 and 2.016