소스 검색

Don't stop ident resolution if function not found. Fixes #174

woollybah 9 년 전
부모
커밋
921106e345
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      expr.bmx

+ 9 - 1
expr.bmx

@@ -2213,7 +2213,15 @@ Type TIdentExpr Extends TExpr
 		Local args:TExpr[]
 		Local args:TExpr[]
 		If rhs args=[rhs]
 		If rhs args=[rhs]
 
 
-		Local fdecl:TFuncDecl=scope.FindFuncDecl( IdentLower(),args, , isArg, True,,SCOPE_ALL )
+		Local fdecl:TFuncDecl
+		
+		Try
+			fdecl=scope.FindFuncDecl( IdentLower(),args, , isArg, True,True,SCOPE_ALL )
+		Catch errorMessage:String
+			If errorMessage.StartsWith("Compile Error") Then
+				Throw errorMessage
+			End If
+		End Try
 
 
 		If fdecl
 		If fdecl
 			If _env.ModuleScope().IsStrict() And Not fdecl.IsProperty() And Not isArg And Not fdecl.maybeFunctionPtr Err "Identifier '"+ident+"' cannot be used in this way."
 			If _env.ModuleScope().IsStrict() And Not fdecl.IsProperty() And Not isArg And Not fdecl.maybeFunctionPtr Err "Identifier '"+ident+"' cannot be used in this way."