D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19948 - Fully qualified name not used in errors when implicit const conversion is involved
Summary: Fully qualified name not used in errors when implicit const conversion is inv...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2019-06-08 00:34 UTC by elpenguino+D
Modified: 2022-03-15 12:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description elpenguino+D 2019-06-08 00:34:13 UTC
```
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 Mathias LANG 2020-09-21 10:00:18 UTC
Similarly, we did this for overrides: https://issues.dlang.org/show_bug.cgi?id=21246
Comment 2 Dlang Bot 2022-03-15 10:38:29 UTC
@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 Dlang Bot 2022-03-15 12:58:07 UTC
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