www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23470] New: Backticks in diagnostic are confusing with wrong


          Issue ID: 23470
           Summary: Backticks in diagnostic are confusing with wrong
                    number of arguments passed
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nick geany.org

E.g. this code:

void foo(void delegate(int) dg)
    //writefln("%s", dg(3));

Below due to the backticks it looks like 0 was the argument value passed, not
the expected number of arguments.

Error: delegate `dg(int)` is not callable using argument types `()`
       too few arguments, expected `1`, got `0`

Should be:
       too few arguments, expected 1, got 0

PR incoming.

Nov 07 2022