mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-26 09:33:13 +01:00
Fixes for closures
This commit is contained in:
@@ -772,6 +772,9 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
||||
}
|
||||
#endif
|
||||
|
||||
FuncGen fg;
|
||||
irfunction->gen = &fg;
|
||||
|
||||
DtoCreateNestedContext(fd);
|
||||
|
||||
#if DMDV2
|
||||
@@ -801,12 +804,8 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
||||
}
|
||||
|
||||
// output function body
|
||||
{
|
||||
FuncGen fg;
|
||||
irfunction->gen = &fg;
|
||||
fd->fbody->toIR(gIR);
|
||||
irfunction->gen = 0;
|
||||
}
|
||||
fd->fbody->toIR(gIR);
|
||||
irfunction->gen = 0;
|
||||
|
||||
// TODO: clean up this mess
|
||||
|
||||
|
||||
Reference in New Issue
Block a user