aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test16657.d
blob: 3143ecd60dc4371dcc902eff22ecd438398387ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
struct A
{
    int x;
}

struct B
{
    A a, b;
}
static assert(B(A(1), A(1)) != B(A(1), A(2))); // Works

struct C
{
    A a, b;
    alias a this;
}
static assert(C(A(1), A(1)) != C(A(1), A(2))); // Fails!