MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail11591b.d
blobef4fe16a2c81059e31952144c2f54db5ac892665
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail11591b.d(16): Error: AA key type `S11591` does not have `bool opEquals(ref const S11591) const`
5 ---
6 */
8 struct S11591
10 bool opEquals(int i) { return false; }
11 Object o; // needed to suppress compiler generated opEquals
14 void test11591()
16 int[S11591] aa;
20 TEST_OUTPUT:
21 ---
22 fail_compilation/fail11591b.d(30): Error: AA key type `S12307a` does not have `bool opEquals(ref const S12307a) const`
23 fail_compilation/fail11591b.d(31): Error: AA key type `S12307b` does not have `bool opEquals(ref const S12307b) const`
24 ---
26 struct S12307a { bool opEquals(T : typeof(this))(T) { return false; } }
28 void test12307()
30 int[S12307a] aa1; // a
31 int[S12307b] aa2; // b
34 struct S12307b { bool opEquals(T : typeof(this))(T) { return false; } }