]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/diag1566.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag1566.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag1566.d(23): Error: multiple ! arguments are not allowed
5 fail_compilation/diag1566.d(24): Error: multiple ! arguments are not allowed
6 fail_compilation/diag1566.d(25): Error: multiple ! arguments are not allowed
7 fail_compilation/diag1566.d(26): Error: multiple ! arguments are not allowed
8 fail_compilation/diag1566.d(28): Error: multiple ! arguments are not allowed
9 fail_compilation/diag1566.d(29): Error: multiple ! arguments are not allowed
10 ---
11 */
12
13 template T(int n)
14 {
15 template T(char c)
16 {
17 alias long T;
18 }
19 }
20
21 void main()
22 {
23 static assert(is(long == T!(3)!('b')));
24 static assert(is(long == T! 3 ! 'b' ));
25 static assert(is(long == T!(3)! 'b' ));
26 static assert(is(long == T! 3 !('b')));
27
28 static assert(is(long == T!(3)! 'b' !"s"));
29 static assert(is(long == T! 3 !('b')!"s"));
30 }