[Issue 14104] New: aa with pointer key type doesn't find existing value
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 1 11:12:45 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14104
Issue ID: 14104
Summary: aa with pointer key type doesn't find existing value
Product: D
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
Found in Higgs, apparently introduced by
https://github.com/D-Programming-Language/dmd/pull/4159.
The key type is const(ubyte)*.
I tracked it down to differing TypeInfos.
On insertion it's TypeInfo_Pointer [1] for opIn it's TypeInfo_P [2].
The latter computes a different hash.
[1]:
https://github.com/D-Programming-Language/druntime/blob/f0c1e13d8bd547eed517b1ae17f085966bb165c1/src/object_.d#L361
[2]:
https://github.com/D-Programming-Language/druntime/blob/2024ca6d3e29362a2fc84ef51c0f73316259d645/src/rt/typeinfo/ti_ptr.d#L18
--
More information about the Digitalmars-d-bugs
mailing list