The following code:
module main;
class Foo
{
this (int a) {}
this (string a) {}
}
void main()
{
auto a = new Foo;
}
Results in the following error message:
main.d(10): Error: None of the overloads of '__ctor' are callable using argument types (), candidates are:
main.d(5): main.Foo.this(int a)
main.d(6): main.Foo.this(string a)
Since __ctor is an internal symbol not visible in the source code I would consider this a bug. The change causing this error message was introduced somewhere between 2.065.0 and 2.066.0. The error message for 2.065.0 looks like this:
main.d(10): Error: constructor main.Foo.this (int a) is not callable using argument types ()
Comment #1 by razvan.nitu1305 — 2018-04-02T09:16:00Z