[Issue 6672] [CTFE] ICE on compile time std.algorithm.sort

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 1 00:03:32 PDT 2011


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2011-10-01 00:02:48 PDT ---
(In reply to comment #3)
> Now the code gives a different error (this error is not produced if this
> sorting is done at run time):
> 
> ...\dmd2\src\phobos\std\algorithm.d(6662): Error: "Failed to sort range of type
> string[]. Actual result is: [alias, align, asm, assert, auto, body, bool,
> break]..."
> test5.d(8):        called from here: sort(kw)
> test5.d(12):        called from here: foo()
> foo()

Aargh, I really fouled that up! Not fixed.
Here's a reduced test case.

void bug6672b(ref string lhs) 
{
    string tmp = lhs;
    lhs = "b";
    assert(tmp == "a");
}

static assert( {
    string q = "m";
    bug6672b(q);
    return true;
}());

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