Skip to content

Commit

Permalink
Properly handle delegate literals in nested context code.
Browse files Browse the repository at this point in the history
They can be demoted to function literals without being static.

GitHub: Fixes ldc-developers#447.
  • Loading branch information
dnadlinger committed Aug 31, 2013
1 parent 8524f22 commit 3022234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/nested.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {

LLStructType* innerFrameType = NULL;
unsigned depth = -1;
if (!fd->isStatic()) {
if (fd->isNested()) {
if (FuncDeclaration* parfd = getParentFunc(fd, true)) {
// Make sure the parent has already been analyzed.
DtoCreateNestedContextType(parfd);
Expand Down

0 comments on commit 3022234

Please sign in to comment.