Browse Source

Limit scoped search to module if that's the current scope. Fixes #409.

woollybah 6 years ago
parent
commit
db1b197792
1 changed files with 5 additions and 1 deletions
  1. 5 1
      expr.bmx

+ 5 - 1
expr.bmx

@@ -2834,8 +2834,12 @@ Type TIdentExpr Extends TExpr
 
 
 		'Local scope:TScopeDecl=IdentScope()
 		'Local scope:TScopeDecl=IdentScope()
 		Local initialScope:Int = SCOPE_ALL
 		Local initialScope:Int = SCOPE_ALL
-		If scope And TClassDecl(scope) Then
+		If scope Then
+			If TClassDecl(scope) Then
 			initialScope = SCOPE_CLASS_HEIRARCHY
 			initialScope = SCOPE_CLASS_HEIRARCHY
+			Else If TModuleDecl(scope) Then
+				initialScope = SCOPE_MODULE
+			End If
 		End If
 		End If
 		
 		
 		Local fdecl:TFuncDecl
 		Local fdecl:TFuncDecl