diff gen/nested.cpp @ 1467:630fc54f7c1e

Fix a bug in DtoNestedInit and update an unrelated comment.
author Frits van Bommel <fvbommel wxs.nl>
date Wed, 03 Jun 2009 12:32:35 +0200
parents 15e9762bb620
children 755abafbf25d
line wrap: on
line diff
--- a/gen/nested.cpp	Wed Jun 03 04:12:28 2009 +0200
+++ b/gen/nested.cpp	Wed Jun 03 12:32:35 2009 +0200
@@ -192,7 +192,7 @@
                 FuncDeclaration *parentfunc = getParentFunc(vd, true);
                 assert(parentfunc && "No parent function for nested variable?");
                 
-                val = DtoGEPi(val, 0, vardepth);
+                val = DtoGEPi(nestedVar, 0, vardepth);
                 val = DtoAlignedLoad(val, (std::string(".frame.") + parentfunc->toChars()).c_str());
             }
             val = DtoGEPi(val, 0, vd->ir.irLocal->nestedIndex, vd->toChars());