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
@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