]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/diag14818.d
Add D front-end, libphobos library, and D2 testsuite.
[gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag14818.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag14818.d(34): Error: none of the overloads of 'func' are callable using argument types (string), candidates are:
5 fail_compilation/diag14818.d(12): diag14818.foo(int _param_0)
6 fail_compilation/diag14818.d(13): diag14818.bar(double _param_0)
7 fail_compilation/diag14818.d(35): Error: overload alias diag14818.X does not match any template declaration
8 fail_compilation/diag14818.d(36): Error: overloadset diag14818.M does not match any template declaration
9 ---
10 */
11
12 void foo(int) {}
13 void bar(double) {}
14 alias func = foo;
15 alias func = bar;
16 // in here, func is a FuncAliasDeclaration;
17
18 template Foo(T) if (is(T == int)) {}
19 template Bar(T) if (is(T == double)) {}
20
21 alias X = Foo;
22 alias X = Bar;
23 // in here, X is an OverDeclaration
24
25 template Mix1() { alias M = Foo; }
26 template Mix2() { alias M = Bar; }
27 mixin Mix1;
28 mixin Mix2;
29 alias Y = M;
30 // in here, Y is an OverloadSet
31
32 void main()
33 {
34 func("abc");
35 alias x = X!string;
36 alias y = Y!string;
37 }
This page took 0.035414 seconds and 5 git commands to generate.