[Issue 8435] New: BigInts don't work well in associative arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 25 07:44:04 PDT 2012


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

           Summary: BigInts don't work well in associative arrays
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-07-25 07:44:03 PDT ---
import std.bigint;
void main() {
    int[BigInt] aa;
    aa[BigInt(100)] = 1;
    assert(BigInt(100) in aa); // assert error
}



While this is OK:

import std.bigint;
void main() {
    int[BigInt] aa;
    auto x = BigInt(100);
    aa[x] = 1;
    assert(x in aa); // assert passes
}

-- 
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