``` 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.
Similarly, we did this for overrides: https://issues.dlang.org/show_bug.cgi?id=21246
@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
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