Browse Source

Fixed error when type failure causes 'var' param - don't call

Brian Fiete 5 years ago
parent
commit
293f4f51a2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 5 - 0
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -5276,6 +5276,11 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
 			wantType = methodInstance->GetParamType(paramIdx);
 			if (wantType->IsSelf())
 				wantType = methodInstance->GetOwner();
+			if (wantType->IsVar())
+			{
+				// Case happens when we can't find the argument type
+				failed = true;
+			}
 			BfParamKind paramKind = methodInstance->GetParamKind(paramIdx);
 
 			if (paramKind == BfParamKind_Params)