Bug 14997 – __ctor present in error message

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2015-09-01T14:10:07Z
Last change time
2018-04-02T13:00:45Z
Assigned to
No Owner
Creator
Jacob Carlborg

Comments

Comment #0 by doob — 2015-09-01T14:10:07Z
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
Comment #2 by github-bugzilla — 2018-04-02T13:00:44Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c2944b50419ae4e3fb7b2d8868c77e42e698c155 Fix Issue 14997 - __ctor present in error message https://github.com/dlang/dmd/commit/80157ad7a339a6fbf94a43bfb8fbab8afe3265da Merge pull request #8115 from RazvanN7/Issue_14997 [Trivial]Fix Issue 14997 - __ctor present in error message