http://d.puremagic.com/issues/show_bug.cgi?id=7365
Summary: AAs broken for Object keys and values with opEquals Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: c...@klickverbot.at --- Comment #0 from klickverbot <c...@klickverbot.at> 2012-01-24 17:59:56 PST --- Didn't fully track it down yet, but the following program asserts in getImpl (mtype.c, line 4371) because AssociativeArray!(Object, TickDuration) can't be instantiated (DMD 2.058 Git): --- struct TickDuration { bool opEquals(ref const TickDuration rhs) const { return true; } } void main() { TickDuration[Object] aa; aa.keys; } --- Having a look at the gagged errors, it seems like the cause is related to the opEquals const correctness issue: --- Error: function object.opEquals (Object lhs, Object rhs) is not callable using argument types (const(Object),const(Object)) Error: cannot implicitly convert expression (this.key) of type const(Object) to object.Object Error: cannot implicitly convert expression (p.key) of type const(Object) to object.Object --- The error is encountered while generating the default opEquals for the Slot type added in https://github.com/D-Programming-Language/druntime/commit/cd7b477b83cc8a75a90258bd2ab63fa8c92ba10b. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------