]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail95.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail95.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail95.d(19): Error: template fail95.A cannot deduce function from argument types !()(int), candidates are:
5 fail_compilation/fail95.d(11): fail95.A(alias T)(T)
6 ---
7 */
8
9 // Issue 142 - Assertion failure: '0' on line 610 in file 'template.c'
10
11 template A(alias T)
12 {
13 void A(T) { T = 2; }
14 }
15
16 void main()
17 {
18 int i;
19 A(i);
20 assert(i == 2);
21 }
22