On 10/08/2014 06:28 PM, Steven Schveighoffer via dmd-beta wrote:
Martin,

If you recall, in 2.066, the AA code was changed to use typeinfo.equals instead 
of typeinfo.compare.

This caused a so called "regression", which prompted Walter to undo the work that 
disallows AA keys with compare override but not equals override (a knee jerk reaction IMO to the 
term "regression"). I believe you had written the code for and pushed for that error. I 
haven't seen your voice on that change, but I thought it was not a good idea to remove that error.

Indeed fairly suboptimal, why hasn't anyone stopped him from doing it?

I don't think it has been undone for classes either, so at least current git 
head is inconsistent.

Your thoughts? Releasing 2.066.1 as is will allow code built to expect opCmp to 
work as an AA key will silently fail as we discussed (I tested this a few weeks 
ago).

Relevant discussion:https://issues.dlang.org/show_bug.cgi?id=13179

Yes, it might silently break certain code, but apparently erroring on code that would work with the compiler generated xOpEquals wasn't acceptable either.
At least it's noted in the changelog.
http://dlang.org/changelog.html#aa-key-requirement
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to