瀏覽代碼

Revert this attempt to fix local function declaration recursion bug.

mingodad 13 年之前
父節點
當前提交
093d9e6ea2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      squirrel/sqcompiler.cpp

+ 1 - 1
squirrel/sqcompiler.cpp

@@ -1076,10 +1076,10 @@ public:
 			varname = Expect(TK_IDENTIFIER);
 			checkLocalNameScope(varname, _scope.nested);
 			Expect(_SC('('));
-			_fs->PushLocalVariable(varname, _scope.nested, _VAR_CLOSURE);
 			CreateFunction(varname,false);
 			_fs->AddInstruction(_OP_CLOSURE, _fs->PushTarget(), _fs->_functions.size() - 1, 0);
 			_fs->PopTarget();
+			_fs->PushLocalVariable(varname, _scope.nested, _VAR_CLOSURE);
 			return;
 		}