aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail15292.d
blob: 3b3602fc5026c79fa5222e08b6a0791c51e46325 (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
26
27
28
// REQUIRED_ARGS: -o-
/*
TEST_OUTPUT:
---
fail_compilation/fail15292.d(27): Error: cannot compare S15292 because its auto generated member-wise equality has recursive definition
---
*/

struct NullableRef15292(T)
{
    inout(T) get() inout
    {
        assert(false);
    }

    alias get this;
}

struct S15292
{
    NullableRef15292!S15292 n;
}

void main()
{
    S15292 s;
    assert(s == s);
}