mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fixed rvalue delegate property access.
Covered by DMD testcase 'test42'.
This commit is contained in:
@@ -3116,10 +3116,9 @@ LruntimeInit:
|
||||
|
||||
DValue* GEPExp::toElem(IRState* p)
|
||||
{
|
||||
// this should be good enough for now!
|
||||
DValue* val = e1->toElem(p);
|
||||
assert(val->isLVal());
|
||||
LLValue* v = DtoGEPi(val->getLVal(), 0, index);
|
||||
// (&a.foo).funcptr is a case where e1->toElem is genuinely not an l-value.
|
||||
LLValue* val = makeLValue(loc, e1->toElem(p));
|
||||
LLValue* v = DtoGEPi(val, 0, index);
|
||||
return new DVarValue(type, DtoBitCast(v, getPtrToType(DtoType(type))));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user