Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test16657.d

raw
1 struct A
2 {
3 int x;
4 }
5
6 struct B
7 {
8 A a, b;
9 }
10 static assert(B(A(1), A(1)) != B(A(1), A(2))); // Works
11
12 struct C
13 {
14 A a, b;
15 alias a this;
16 }
17 static assert(C(A(1), A(1)) != C(A(1), A(2))); // Fails!