middle-end: Lower all gconds during vector pattern matching [PR117176]
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail58.d
blobae70da259b69019726d29b1102b705fb46f04e25
1 /*
2 TEST_OUTPUT:
3 ----
4 fail_compilation/fail58.d(28): Error: function `SomeFunc` is not callable using argument types `(string, int)`
5 fail_compilation/fail58.d(28): cannot pass argument `"123"` of type `string` to parameter `dchar[] pText`
6 fail_compilation/fail58.d(14): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here
7 fail_compilation/fail58.d(32): Error: function `SomeFunc` is not callable using argument types `(string, int)`
8 fail_compilation/fail58.d(32): cannot pass argument `""` of type `string` to parameter `dchar[] pText`
9 fail_compilation/fail58.d(14): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here
10 ----
12 debug import std.stdio;
13 const int anything = -1000; // Line #2
14 dchar[] SomeFunc( dchar[] pText, out int pStopPosn)
16 if (pText.length == 0)
17 pStopPosn = 0;
18 else
19 pStopPosn = -1;
20 debug writefln("DEBUG: using '%s' we get %d", pText, pStopPosn);
21 return pText.dup;
24 int main(char[][] pArgs)
26 int sp;
28 SomeFunc("123", sp);
29 debug writefln("DEBUG: got %d", sp);
30 assert(sp == -1);
32 SomeFunc("", sp);
33 // if (sp != 0){} // Line #22
34 debug writefln("DEBUG: got %d", sp);
35 assert(sp == -1);
36 return 0;