Ver código fonte

Fixed nested functions declaration order issue.

woollybah 9 anos atrás
pai
commit
5f5829eee2
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      ctranslator.bmx

+ 6 - 0
ctranslator.bmx

@@ -2331,6 +2331,12 @@ End Rem
 
 
 		' emit nested functions
 		' emit nested functions
 		If Not proto Then
 		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
 			For Local fdecl:TFuncDecl = EachIn decl._decls
 				EmitFuncDecl(fdecl, proto, classFunc)
 				EmitFuncDecl(fdecl, proto, classFunc)
 			Next
 			Next