Browse Source

Fixed nested functions declaration order issue.

woollybah 9 years ago
parent
commit
5f5829eee2
1 changed files with 6 additions and 0 deletions
  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