www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23898] New: Incorrect error message when function not found

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

          Issue ID: 23898
           Summary: Incorrect error message when function not found
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: ryuukk.dev gmail.com

```
struct Something{}

void main()
{
    Something test; 
    test.get();
}
```

spits:

```
onlineapp.d(6): Error: none of the overloads of template `object.get` are
callable using argument types `!()(Something)`
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3442):       
Candidates are: `get(K, V)(inout(V[K]) aa, K key, lazy inout(V) defaultValue)`
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(3449):               
        `get(K, V)(inout(V[K])* aa, K key, lazy inout(V) defaultValue)`
```


Why confuse the user?

--
May 06 2023