Not yet fixed in these 2 slight variants:
Test case 2:
-----------------------------------
static assert({
immutable p = "pp";
int[string] pieces = [p: 0];
pieces["qq"] = 1;
return true;
}());
-----------------------------------
x.d(6): Error: cannot evaluate delegate pure nothrow bool()
....
-----------------------------------
Test case 3:
-----------------------------------
static assert({
immutable renames = [0: "pp"];
int[string] pieces;
pieces[true ? renames[0] : "qq"] = 1;
pieces["anything"] = 1;
return true;
}());
-----------------------------------
x.d(7): Error: cannot evaluate delegate pure nothrow bool()
....
-----------------------------------
Comment #4 by kennytm — 2011-07-22T01:40:27Z
(In reply to comment #3)
> Not yet fixed in these 2 slight variants:
>
[snip]
... and the cause of these 2 variants are the same: Equals() in constfold.c cannot handle (e1->op == TOKslice && e2->op == TOKstring).