mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Fixed problem with taking the delegate of a nested function of the current function.
This commit is contained in:
@@ -1863,12 +1863,8 @@ DValue* DelegateExp::toElem(IRState* p)
|
||||
DValue* u = e1->toElem(p);
|
||||
LLValue* uval;
|
||||
if (DFuncValue* f = u->isFunc()) {
|
||||
assert(f->func);
|
||||
LLValue* contextptr;
|
||||
if (p->func()->decl == f->func)
|
||||
contextptr = p->func()->thisArg;
|
||||
else
|
||||
contextptr = DtoNestedContext(loc, f->func);
|
||||
assert(f->func);
|
||||
LLValue* contextptr = DtoNestedContext(loc, f->func);
|
||||
uval = DtoBitCast(contextptr, getVoidPtrType());
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user