Bug 20800 – Error: cannot implicitly convert expression with bad diagnostic.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-06T13:27:12Z
Last change time
2020-05-15T10:50:17Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2020-05-06T13:27:12Z
``` struct RegexMatch { string index() { return null; } ~this() { } } static m() { return RegexMatch(); } void initCommands() { auto a = new int[](m.index); } ``` Yields the error: Error: cannot implicitly convert expression ((RegexMatch __tmpfordtor3 = m();) , __tmpfordtor3).index() of type string to ulong The exposed lowering of m.index should not be there in the message.
Comment #1 by dlang-bot — 2020-05-08T05:09:04Z
@RazvanN7 created dlang/dmd pull request #11106 "Fix Issue 20800 - Error: cannot implicitly convert expression with bad diagnostic" fixing this issue: - Fix Issue 20800 - Error: cannot implicitly convert expression with bad diagnostic https://github.com/dlang/dmd/pull/11106
Comment #2 by dlang-bot — 2020-05-15T10:50:17Z
dlang/dmd pull request #11106 "Fix Issue 20800 - Error: cannot implicitly convert expression with bad diagnostic" was merged into master: - b09ba8a9cdf9f2255f3c64cafce82258f6d67201 by RazvanN7: Fix Issue 20800 - Comma Expression should not appear in error messages https://github.com/dlang/dmd/pull/11106