[Issue 20136] New: opEquals not recognized for AA key
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 17 19:43:11 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20136
Issue ID: 20136
Summary: opEquals not recognized for AA key
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: tim.dlang at t-online.de
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
--
More information about the Digitalmars-d-bugs
mailing list