[Issue 14997] New: __ctor present in error message
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 1 07:10:07 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14997
Issue ID: 14997
Summary: __ctor present in error message
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: doob at me.com
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 ()
--
More information about the Digitalmars-d-bugs
mailing list