summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/ice16035.d
blob: 8361c42cf2ebe835358e401f42cff1799c24134a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
TEST_OUTPUT:
---
fail_compilation/ice16035.d(18): Error: forward reference to inferred return type of function call `this.a[0].toString()`
fail_compilation/ice16035.d(13): Error: template instance `ice16035.Value.get!string` error instantiating
---
*/

struct Value
{
    auto toString() inout
    {
        get!string;
    }

    T get(T)()
    {
        a[0].toString();
    }

    const(Value)* a;
}