d: Merge dmd. druntime e770945277, phobos 6d6e0b9b9
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diagin.d
blob6e8a472cee688dfd698052549c6f54015aad1708
1 /*
2 REQUIRED_ARGS: -preview=in
3 TEST_OUTPUT:
4 ---
5 fail_compilation/diagin.d(15): Error: function `foo` is not callable using argument types `()`
6 fail_compilation/diagin.d(15): too few arguments, expected 1, got 0
7 fail_compilation/diagin.d(20): `diagin.foo(in int)` declared here
8 fail_compilation/diagin.d(17): Error: template `foo1` is not callable using argument types `!()(bool[])`
9 fail_compilation/diagin.d(21): Candidate is: `foo1(T)(in T v, string)`
10 ---
13 void main ()
15 foo();
16 bool[] lvalue;
17 foo1(lvalue);
20 void foo(in int) {}
21 void foo1(T)(in T v, string) {}
23 // Ensure that `in` has a unique mangling
24 static assert(foo.mangleof == `_D6diagin3fooFIiZv`);
25 static assert(foo1!int.mangleof == `_D6diagin__T4foo1TiZQiFNaNbNiNfIiAyaZv`);
26 static assert(foo1!char.mangleof == `_D6diagin__T4foo1TaZQiFNaNbNiNfIaAyaZv`);