gcc/testsuite/gdc.test/fail_compilation/extra-files/test23109/object.d
raw| 1 | module object; |
| 2 | |
| 3 | alias size_t = typeof(int.sizeof); |
| 4 | class Object {} |
| 5 | auto opEquals(Object ) { return true; } |
| 6 | class TypeInfo {} |
| 7 | class TypeInfo_Const {} |
| 8 | bool _xopEquals() { return true; } |
| 9 | |
| 10 | bool __equals(T1, T2)(T1[] lhs, T2[] rhs) |
| 11 | { |
| 12 | static at(R)(R[] r, size_t i) { return r.ptr[i]; } |
| 13 | foreach (u; 0 .. lhs.length) |
| 14 | if (at(lhs, u) != at(rhs, u)) |
| 15 | return false; |
| 16 | return true; |
| 17 | } |