Take the following code:

```d
void main()
{
shared class C { bool opEquals(const(shared(C)) rhs) const shared { return true;}}
    const(C) c = new C();
    const(C)[] a = [c];
    const(C)[] b = [c];
    assert(a[0] == b[0]);
}
```

This code (supposedly) checks whether ```a``` and ```b``` are equal. The thing is, it doesn't, because C is defined as ```shared```. Is there anything I can do to fix this?

Reply via email to