www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19948] New: Fully qualified name not used in errors when

https://issues.dlang.org/show_bug.cgi?id=19948

          Issue ID: 19948
           Summary: Fully qualified name not used in errors when implicit
                    const conversion is involved
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

```
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.

--
Jun 07 2019