]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/diag13942.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag13942.d
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 `diag13942.to!double.to` cannot deduce function from 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 }