Bug 35 – missleading error message for circular constructor paths

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P5
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-03-11T10:46:00Z
Last change time
2014-02-15T02:10:00Z
Assigned to
bugzilla
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2006-03-11T10:46:28Z
class A{ this(int i){ } } class B : A{ this(int i){ this = new C(i); } } class C : B{ this(int i){ } } class A{ this(int i){ } } class B : A{ this(int i){ this = new C(i); } } class C : B{ this(int i){ } } DMD-0.149 reports: a.d(2): constructor a.A.this (int) does not match argument types () Error: expected 1 arguments, not 0 a.d(7): constructor a.B.this (int) does not match argument types () Error: expected 1 arguments, not 0 The real cause aren't unexpected numbers of arguments but a circular constructor path between a.C (line 13) and a.B(line 8).
Comment #1 by bugzilla — 2006-04-28T02:56:17Z
It's not a circular constructor path, it's looking for a super() constructor. Fixed error message. Fixed 0.155