Bug 19419 – [REG2.080.1] @disabled this() will print wrong error if calling non-default constructor with wrong parameters

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-11-21T15:25:39Z
Last change time
2018-11-25T10:25:37Z
Assigned to
No Owner
Creator
Radu Racariu

Comments

Comment #0 by radu.racariu — 2018-11-21T15:25:39Z
The following: ``` struct B { @disable this(); this(string s) {} } void main() { auto b = B(3); } ``` Gives misleading error message: Failure with output: onlineapp.d(11): Error: constructor `onlineapp.B.this` is not callable because it is annotated with `@disable` Previous release printed: onlineapp.d(11): Error: none of the overloads of `__ctor` are callable using argument types `(int)`, candidates are: onlineapp.d(3): `onlineapp.B.this()` onlineapp.d(5): `onlineapp.B.this(string s)` Which were clear and helpful.
Comment #1 by razvan.nitu1305 — 2018-11-22T13:52:13Z
Comment #2 by github-bugzilla — 2018-11-25T10:25:33Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/837bbc2dfa98b413694352a2ce8a191bb706aa34 Fix Issue 19419 - [REG2.080.1] @disabled this() will print wrong error if calling non-default constructor with wrong parameters https://github.com/dlang/dmd/commit/579dc9d455be817bf15aebf584f780b161c53f2f Merge pull request #8994 from RazvanN7/Issue_19419 Fix Issue 19419 - [REG2.080.1] @disabled this() will print wrong error if calling non-default constructor with wrong parameters