mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-29 02:53:14 +01:00
Fix with(symbol) statement.
This commit is contained in:
@@ -1300,9 +1300,13 @@ void WithStatement::toIR(IRState* p)
|
||||
assert(exp);
|
||||
assert(body);
|
||||
|
||||
DValue* e = exp->toElem(p);
|
||||
LLValue* mem = DtoRawVarDeclaration(wthis);
|
||||
DtoStore(e->getRVal(), mem);
|
||||
// with(..) can either be used with expressions or with symbols
|
||||
// wthis == null indicates the symbol form
|
||||
if (wthis) {
|
||||
DValue* e = exp->toElem(p);
|
||||
LLValue* mem = DtoRawVarDeclaration(wthis);
|
||||
DtoStore(e->getRVal(), mem);
|
||||
}
|
||||
|
||||
body->toIR(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user