Bug 20136 – opEquals not recognized for AA key

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-08-17T19:43:11Z
Last change time
2019-08-20T06:20:39Z
Keywords
pull
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2019-08-17T19:43:11Z
The following code compiles with dmd 2.086.0, but not with dmd 2.086.1 or dmd 2.088.0-beta.1: class Context { size_t[const(Key)] aa; bool checkAll; } struct Key { Context context; int i; bool opEquals(ref const Key other) const { if(context.checkAll && i != other.i) return false; return true; } } Dmd 2.086.1 prints the following error message: Error: AA key type Key does not have bool opEquals(ref const Key) const
Comment #1 by razvan.nitu1305 — 2019-08-19T14:08:48Z
Regression introduced by: https://github.com/dlang/dmd/pull/9884
Comment #2 by dlang-bot — 2019-08-19T14:45:22Z
@RazvanN7 created dlang/dmd pull request #10320 "Fix Issue 20136 - opEquals not recognized for AA key" fixing this issue: - Fix Issue 20136 - opEquals not recognized for AA key https://github.com/dlang/dmd/pull/10320
Comment #3 by dlang-bot — 2019-08-20T06:20:39Z
dlang/dmd pull request #10320 "Fix Issue 20136 - opEquals not recognized for AA key" was merged into stable: - b6394152daf85641fb5083f5df51486870e844a8 by RazvanN7: Fix Issue 20136 - opEquals not recognized for AA key https://github.com/dlang/dmd/pull/10320