Debian Codegraph @

gcc/testsuite/gdc.test/compilable/pr9383.d

raw
1 // REQUIRED_ARGS: -preview=dip1000
2 // https://github.com/dlang/dmd/pull/9383
3
4 void test() @safe
5 {
6 int[1] a = [1];
7 cartesianProduct(a[]);
8 }
9
10 auto cartesianProduct(RR...)(RR ranges)
11 {
12 static struct Result
13 {
14 RR current;
15
16 void popFront() scope @safe
17 {
18 foreach (ref r; current)
19 {
20 }
21 }
22 }
23
24 return Result(ranges);
25 }