MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diagin.d
blob1748e92a841a35c30a2da54549c58ae18af244b7
1 /*
2 PERMUTE_ARGS: -preview=in
3 TEST_OUTPUT:
4 ---
5 fail_compilation/diagin.d(14): Error: function `diagin.foo(in int)` is not callable using argument types `()`
6 fail_compilation/diagin.d(14): too few arguments, expected 1, got 0
7 fail_compilation/diagin.d(16): Error: template `diagin.foo1` is not callable using argument types `!()(bool[])`
8 fail_compilation/diagin.d(20): Candidate is: `foo1(T)(in T v, string)`
9 ---
12 void main ()
14 foo();
15 bool[] lvalue;
16 foo1(lvalue);
19 void foo(in int) {}
20 void foo1(T)(in T v, string) {}
22 // Ensure that `in` has a unique mangling
23 static assert(foo.mangleof == `_D6diagin3fooFIiZv`);
24 static assert(foo1!int.mangleof == `_D6diagin__T4foo1TiZQiFNaNbNiNfIiAyaZv`);
25 static assert(foo1!char.mangleof == `_D6diagin__T4foo1TaZQiFNaNbNiNfIaAyaZv`);