summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/ice13644.d
blob: aa44709124a31d3fbb86b42572e1a836617a95fd (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
/*
TEST_OUTPUT:
---
fail_compilation/ice13644.d(22): Error: foreach: key cannot be of non-integral type `string`
---
*/

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

Tuple!(string, string)[] foo()
{
    Tuple!(string, string)[] res;
    return res;
}

void main()
{
    foreach (string k2, string v2; foo())
    {
    }
}