Explorar el Código

Improved handling of module local resolution.

woollybah hace 9 años
padre
commit
7fe13848be
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      expr.bmx

+ 6 - 1
expr.bmx

@@ -2221,7 +2221,12 @@ Type TIdentExpr Extends TExpr
 		If TLocalDecl( vdecl )
 		If TLocalDecl( vdecl )
 			' local variable should (at least) be in the same function scope.
 			' local variable should (at least) be in the same function scope.
 			If vdecl.FuncScope() <> scope.FuncScope() Then
 			If vdecl.FuncScope() <> scope.FuncScope() Then
-				vdecl = Null
+				' or the local can be in localmain..
+				If TModuleDecl(scope) And vdecl.FuncScope() And vdecl.FuncScope().ident = "__LocalMain" Then
+					' ok
+				Else
+					vdecl = Null
+				End If
 			End If
 			End If
 		End If
 		End If