[Issue 11557] Can't compare `const`/`immutable` classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 21 07:30:17 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11557



--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2013-11-21 07:30:09 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > Why this issue is marked as "regression"? As far as I know, the code you shown
> > had never worked correctly.
> 
> Associative arrays use `TypeInfo.compare` and `std.typecons.Tuple` has its
> `opCmp` with by element comparison for a long time. As `Tuple`-s stopped
> working as AA keys (it worked at least a year ago) I decided it was a compiler
> change. If it's not please remove the REGRESSION status.

See my comment in your PR. To me the old worked behavior was essentially wrong,
and I think it should be kept broken until class const correctness will be
fixed.

https://github.com/D-Programming-Language/phobos/pull/1707#issuecomment-28992632

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list