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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 951 - Missing line number: no constructor provided for a class derived from a class with no default constructor
Summary: Missing line number: no constructor provided for a class derived from a class...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords: diagnostic
Depends on:
Blocks:
Reported: 2007年02月11日 20:13 UTC by Stewart Gordon
Modified: 2014年02月16日 15:25 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Stewart Gordon 2007年02月11日 20:13:06 UTC
----------
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 Thomas Kühne 2007年03月29日 14:30:23 UTC
Added to DStress as
http://dstress.kuehne.cn/nocompile/t/this_15_A.d 
Comment 2 Don 2008年07月09日 07:11:42 UTC
Fixed DMD1.032
Comment 3 Walter Bright 2008年07月09日 22:37:31 UTC
Fixed dmd 1.032 and 2.016


AltStyle によって変換されたページ (->オリジナル) /