aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/test19107.d
blob: 93d86bf381bccd5bf6f77746e1c73487d434ff28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
EXTRA_FILES: imports/imp19661.d imports/test19107a.d imports/test19107b.d
TEST_OUTPUT:
---
fail_compilation/test19107.d(24): Error: none of the overloads of template `test19107.all` are callable using argument types `!((c) => c)(string[])`
fail_compilation/test19107.d(18):        Candidate is: `all(alias pred, T)(T t)`
  with `pred = __lambda2,
       T = string[]`
  must satisfy the following constraint:
`       is(typeof(I!pred(t)))`
---
*/

// https://issues.dlang.org/show_bug.cgi?id=19107

import imports.test19107b;

void all(alias pred, T)(T t)
    if (is(typeof(I!pred(t))))
{ }

void main(string[] args)
{
    args.all!(c => c);
}