Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/diag13942.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag13942.d(18): Error: template instance `isRawStaticArray!()` does not match template declaration `isRawStaticArray(T, A...)`
5 fail_compilation/diag13942.d(26): Error: template `to` is not callable using argument types `!()()`
6 fail_compilation/diag13942.d(17): Candidate is: `to(A...)(A args)`
7 ---
8 */
9
10 template isRawStaticArray(T, A...)
11 {
12 enum isRawStaticArray = false;
13 }
14
15 template to(T)
16 {
17 T to(A...)(A args)
18 if (!isRawStaticArray!A)
19 {
20 return 0;
21 }
22 }
23
24 void main(string[] args)
25 {
26 auto t = to!double();
27 }