Fix #125 - fix generation of nested context chains.

Just declaring the type of the parent is obviously not enoguh, we need to have run this very code for determining level and context type (if the parent is also nested, that is).
This commit is contained in:
David Nadlinger
2012-06-23 17:01:21 +02:00
parent 0c6fcc12ec
commit 61e61e47f0

View File

@@ -417,8 +417,8 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {
unsigned depth = -1;
if (!fd->isStatic()) {
if (FuncDeclaration* parfd = getParentFunc(fd, true)) {
// Make sure parfd->ir.irFunc has already been set.
DtoDeclareFunction(parfd);
// Make sure the parent has already been analyzed.
DtoCreateNestedContextType(parfd);
innerFrameType = parfd->ir.irFunc->frameType;
if (innerFrameType)