[Issue 23898] New: Incorrect error message when function not found

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 6 16:21:35 UTC 2023


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 at puremagic.com
          Reporter: ryuukk.dev at 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?

--


More information about the Digitalmars-d-bugs mailing list