Bug 13082 – Spurious error message with failed call to class ctor

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-09T08:58:00Z
Last change time
2014-08-22T08:04:29Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-07-09T08:58:46Z
class Foo { this(int a) {} } void main() { string b; new Foo(b); } dmd 2.066beta gives: test.d(6,5): Error: constructor test.Foo.this (int a) is not callable using argument types (string) test.d(6,5): Error: no constructor for Foo I suggest to omit the second error message. It's better to give only useful error messages and reduce the noise. Reducing the noise is very useful for longer programs that give many error messages.
Comment #1 by k.hara.pg — 2014-07-10T02:17:09Z
Comment #2 by github-bugzilla — 2014-07-13T02:40:34Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/320636d8f73da751a0764234649ee5d48615ac88 fix Issue 13082 - Spurious error message with failed call to class ctor https://github.com/D-Programming-Language/dmd/commit/dde4e7342f0b9a84eed9ff06dc4e94d0bc7f564a Merge pull request #3734 from 9rnsr/fix13082 Issue 13082 - Spurious error message with failed call to class ctor
Comment #3 by github-bugzilla — 2014-07-16T03:52:24Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fb2c3b640eb4ea06e7d8874c3dec5bdc6c213727 Merge pull request #3734 from 9rnsr/fix13082 Issue 13082 - Spurious error message with failed call to class ctor
Comment #4 by github-bugzilla — 2014-08-22T08:04:29Z