Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/test19971.d

raw
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/test19971.d(16): Error: function `f` is not callable using argument types `(string)`
4 fail_compilation/test19971.d(16): cannot pass argument `"%s"` of type `string` to parameter `int x`
5 fail_compilation/test19971.d(13): `test19971.f(int x)` declared here
6 fail_compilation/test19971.d(17): Error: function literal `(int x) { }` is not callable using argument types `(string)`
7 fail_compilation/test19971.d(17): cannot pass argument `"%s"` of type `string` to parameter `int x`
8 ---
9 */
10
11 // https://issues.dlang.org/show_bug.cgi?id=19971
12
13 void f(int x) {}
14 void main()
15 {
16 f("%s");
17 (int x) {} ("%s");
18 }