Re: Array Wierdness

2022-08-10 Thread Ruby The Roobster via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 15:50:45 UTC, Steven Schveighoffer wrote: On 8/10/22 11:26 AM, Ruby The Roobster wrote: [SNIP] A related bug: https://issues.dlang.org/show_bug.cgi?id=23140 -Steve Funnily enough, I came across this when trying to fix that same bug.

Re: Array Wierdness

2022-08-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/10/22 11:26 AM, Ruby The Roobster wrote: On Wednesday, 10 August 2022 at 15:19:41 UTC, Ruby The Roobster wrote: 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 =

Re: Array Wierdness

2022-08-10 Thread Ruby The Roobster via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 15:19:41 UTC, Ruby The Roobster wrote: 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] =