http://d.puremagic.com/issues/show_bug.cgi?id=10424
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Andrej Mitrovic <[email protected]> 2013-06-20 08:33:18 PDT --- In Expression *AssignExp::semantic(Scope *sc) I could add this check: diff --git a/src/expression.c b/src/expression.c index becbcbb..19e008d 100644 --- a/src/expression.c +++ b/src/expression.c @@ -11153,8 +11153,10 @@ Ltupleassign: else if (e1->op == TOKslice) { Type *tn = e1->type->nextOf(); - if (op == TOKassign && e1->checkModifiable(sc) == 1 && !tn->isMutable()) - { error("slice %s is not mutable", e1->toChars()); + if (op == TOKassign && e1->checkModifiable(sc) == 1 && + (!tn->isMutable() || !((SliceExp *)e1)->e1->isLvalue())) + { + error("slice %s is not mutable", e1->toChars()); return new ErrorExp(); } } But I don't think that's totally correct. Kenji? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
