[Issue 10118] New: BigInt as associative array key wrong behavior

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 19 09:05:17 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10118

           Summary: BigInt as associative array key wrong behavior
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: alvaro.segura at gmail.com


--- Comment #0 from Alvaro <alvaro.segura at gmail.com> 2013-05-19 09:05:16 PDT ---
Associative arrays with BigInts as keys are unusable:

import std.bigint, std.stdio;
void main()
{
    int[BigInt] a;
    a[BigInt(3)] = 3;
    a[BigInt(3)] = 4;
    writeln(a);
}

Prints:

[3:3, 3:4]

Apparently duplicate keys.

Probably related to Issue 8435.

I thought this was a consequence of Issue 3789 because BigInt is a struct
containing a string. But that was resolved recently, and this bug still appears
in 2.063 beta.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list