summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test15780.d
blob: 047d5f6b502084463d2caeffb3d2d797ffb99fcc (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
// PERMUTE_ARGS:
// https://issues.dlang.org/show_bug.cgi?id=15780

void foo(alias fields)() {
    foreach(i, field; fields) {
        enum string a = fields[i];  // OK
        enum string b = field;      // not OK with 2.069.2 ???
    }
}

void main() {
    foo!(tuple("H", "I"))();
}

Tuple!T tuple(T...)(T values)
{
    return Tuple!T(values);
}

struct Tuple(T...)
{
    T values;
    alias values this;
}