https://issues.dlang.org/show_bug.cgi?id=23291
--- Comment #3 from Ruby The Roobster <rubytheroobs...@yandex.com> --- (In reply to Boris Carvajal from comment #2) > Same as issue 23140, it never worked! > This code actually did work as intended, 23140, unless you mean something else which I don't understand. > ```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. That's another issue that I also noticed. --