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

          Issue ID: 19971
           Summary: wrong string literals in "cannot pass argument" errors
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic, ice
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

I've noticed this bug when reading this forum post:
https://forum.dlang.org/post/[email protected]

Code:
----
void f(int x) {}
void main()
{
    f("%i");
}
----

The error message says (DMD 2.086.0):
----
test.d(4):        cannot pass argument "1" of type string to parameter int x
----

Instead it should say:
----
test.d(4):        cannot pass argument "%i" of type string to parameter int x
----

With `f("%s");` DMD even segfaults.

Fix incoming.

--

Reply via email to