mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-10-01 01:29:24 +02:00
Fixed AA Rvalue-only access (like indexing an AA return value immediately).
This commit is contained in:
+2
-2
@@ -1034,7 +1034,7 @@ DValue* IndexExp::toElem(IRState* p)
|
||||
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 @@ DValue* AssocArrayLiteralExp::toElem(IRState* p)
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user