https://issues.dlang.org/show_bug.cgi?id=23291

Boris Carvajal <boris...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |boris...@gmail.com

--- Comment #2 from Boris Carvajal <boris...@gmail.com> ---
Same as issue 23140, it never worked!

```d
const(shared C) c = new shared C();
const(shared C)[] a = [c];
const(shared C)[] b = [c];
assert(a[0] == b[0]);
```

Also, you should put `override` in `opEquals` definition:

`override bool opEquals(const(shared(Object)) rhs) const shared`

Now the real problem is more clear, there is no shared compatible `opEquals` in
D runtime so you can't even override it with your own implementation.

A quick search shows it's already reported in issues 4857, 9670, 14509.
Sad that one of them is 12 years old.

--

Reply via email to