瀏覽代碼

Fixed nested functions declaration order issue.

woollybah 9 年之前
父節點
當前提交
5f5829eee2
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      ctranslator.bmx

+ 6 - 0
ctranslator.bmx

@@ -2331,6 +2331,12 @@ End Rem
 
 		' emit nested functions
 		If Not proto Then
+			' emit nested protos
+			For Local fdecl:TFuncDecl = EachIn decl._decls
+				EmitFuncDecl(fdecl, True, classFunc)
+			Next
+			
+			' emit nested bodies
 			For Local fdecl:TFuncDecl = EachIn decl._decls
 				EmitFuncDecl(fdecl, proto, classFunc)
 			Next