Mercurial > projects > ldc
diff gen/toir.cpp @ 458:121624c14053
Fixed AA Rvalue-only access (like indexing an AA return value immediately).
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 02 Aug 2008 22:35:24 +0200 |
parents | 30ef3c7bddca |
children | 3a5d6ff8c70f |
line wrap: on
line diff
--- a/gen/toir.cpp Sat Aug 02 21:51:49 2008 +0200 +++ b/gen/toir.cpp Sat Aug 02 22:35:24 2008 +0200 @@ -1034,7 +1034,7 @@ arrptr = DtoGEP1(arrptr,r->getRVal()); } else if (e1type->ty == Taarray) { - return DtoAAIndex(loc, type, l, r); + return DtoAAIndex(loc, type, l, r, modifiable); } else { Logger::println("invalid index exp! e1type: %s", e1type->toChars()); @@ -2255,7 +2255,7 @@ // index DValue* key = ekey->toElem(p); - DValue* mem = DtoAAIndex(loc, vtype, aa, key); + DValue* mem = DtoAAIndex(loc, vtype, aa, key, true); // store DValue* val = eval->toElem(p);