[Issue 19971] New: wrong string literals in "cannot pass argument" errors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 15 23:07:18 UTC 2019
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: nobody at puremagic.com
Reporter: ag0aep6g at gmail.com
I've noticed this bug when reading this forum post:
https://forum.dlang.org/post/rjdgoaoowxgvekraktwx@forum.dlang.org
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.
--
More information about the Digitalmars-d-bugs
mailing list