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.