August 17, 2019 [Issue 20136] New: opEquals not recognized for AA key | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: tim.dlang@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 -- |
Copyright © 1999-2021 by the D Language Foundation