Debian Codegraph @

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

raw
1 /*
2 EXTRA_FILES: imports/imp19661.d imports/test19107a.d imports/test19107b.d
3 TEST_OUTPUT:
4 ---
5 fail_compilation/test19107.d(24): Error: template `all` is not callable using argument types `!((c) => c)(string[])`
6 fail_compilation/test19107.d(18): Candidate is: `all(alias pred, T)(T t)`
7 with `pred = (c) => c,
8 T = string[]`
9 must satisfy the following constraint:
10 ` is(typeof(I!pred(t)))`
11 ---
12 */
13
14 // https://issues.dlang.org/show_bug.cgi?id=19107
15
16 import imports.test19107b;
17
18 void all(alias pred, T)(T t)
19 if (is(typeof(I!pred(t))))
20 { }
21
22 void main(string[] args)
23 {
24 args.all!(c => c);
25 }