March 11, 2006 [Bug 35] New: missleading error message for circular constructor paths | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/bugzilla/show_bug.cgi?id=35 Summary: missleading error message for circular constructor paths Product: D Version: 0.149 Platform: PC OS/Version: Linux Status: NEW Severity: minor Priority: P5 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: thomas-dloop@kuehne.cn 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). -- |
April 28, 2006 [Bug 35] missleading error message for circular constructor paths | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/bugzilla/show_bug.cgi?id=35 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2006-04-28 02:56 ------- It's not a circular constructor path, it's looking for a super() constructor. Fixed error message. Fixed 0.155 -- |
Copyright © 1999-2021 by the D Language Foundation