From 61e61e47f0b7373d4387c8ce366e313205b93967 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 23 Jun 2012 17:01:21 +0200 Subject: [PATCH] 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). --- gen/nested.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/nested.cpp b/gen/nested.cpp index 670a0800..e2397ecc 100644 --- a/gen/nested.cpp +++ b/gen/nested.cpp @@ -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)