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

           Summary: Problem with heapified Array!BigInt
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-05-14 04:37:23 PDT ---
I am not sure what's happening here (so no keywords), probably I am missing
something. I am not even sure this is a bug, so it's better to ask here first.
This crashes at runtime with no stack trace (DMD 2.053):


import std.stdio, std.bigint, std.container;
int foo() {
    Array!BigInt bar;
    bar ~= BigInt(2);
    auto spam = heapify(bar);
    spam.insert(BigInt(10));
    spam.insert(BigInt(20));
    return 1;
}
void main() {
    writeln(foo());
}


If I replace the BigInts with ints:

import std.stdio, std.container;
int foo() {
    Array!int bar;
    bar ~= 2;
    auto spam = heapify(bar);
    spam.insert(10);
    spam.insert(20);
    return 1;
}
void main() {
    writeln(foo());
}


I get:
...\dmd\src\phobos\std\container.d(2660): Error: this._store()[this._length()]
is not an lvalue

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

Reply via email to