]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.dg/gdc122.d
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gdc.dg / gdc122.d
1 // https://bugzilla.gdcproject.org/show_bug.cgi?id=122
2 // { dg-do compile }
3
4 struct map(alias fun)
5 {
6 @property run()
7 {
8 }
9 }
10
11 struct Task(Args)
12 {
13 Args _args;
14 }
15
16 class TaskPool
17 {
18 template reduce(functions...)
19 {
20 auto reduce(Args)(Args args)
21 {
22 alias RTask = Task!(typeof(args));
23 auto task = RTask();
24 }
25 }
26 }
27
28 TaskPool taskPool() {
29 return new TaskPool;
30 }
31
32 void test122()
33 {
34 enum delta = 1;
35 taskPool.reduce!"a + b"(map!({ immutable x = delta; })());
36 }