aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr111650.d
blob: 4298a76d38f9820e5967e94cbe938330c1c331cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }
ref V require(K, V)(ref V[K] aa, K key, lazy V value);

struct Root
{
    ulong[3] f;
}

Root[ulong] roots;

Root getRoot(int fd, ulong rootID)
{
    return roots.require(rootID,
    {
            Root result;
            inoLookup(fd, () => result);
            return result;
    }());
}

void inoLookup(int, scope Root delegate()) { }