Bug 19948 – Fully qualified name not used in errors when implicit const conversion is involved
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-08T00:34:13Z
Last change time
2022-03-15T12:58:07Z
Keywords
pull
Assigned to
No Owner
Creator
elpenguino+D
Comments
Comment #0 by elpenguino+D — 2019-06-08T00:34:13Z
```
struct X {}
void main() {
struct X {}
func(X());
}
void func(const(X)) {}
```
Currently results in:
```
onlineapp.d(4): Error: function `onlineapp.func(const(X))` is not callable using argument types `(X)`
onlineapp.d(4): cannot pass argument `X()` of type `X` to parameter `const(X)`
```
which isn't particularly helpful.
Without const, it helpfully uses the fully qualified names in the error message.
Comment #1 by pro.mathias.lang — 2020-09-21T10:00:18Z
@RazvanN7 created dlang/dmd pull request #13825 "Fix Issue 19948 - Fully qualified name not used in errors when implicit const conversion is involved" fixing this issue:
- Fix Issue 19948 - Fully qualified name not used in errors when implicit const conversion is involved
https://github.com/dlang/dmd/pull/13825
Comment #3 by dlang-bot — 2022-03-15T12:58:07Z
dlang/dmd pull request #13825 "Fix Issue 19948 - Fully qualified name not used in errors when implicit const conversion is involved" was merged into master:
- 1f3fff2d4ece8dcc4414dc61c74593a05f765f61 by RazvanN7:
Fix Issue 19948 - Fully qualified name not used in errors when implicit const conversion is involved
https://github.com/dlang/dmd/pull/13825