Prechádzať zdrojové kódy

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

Brian Fiete 5 rokov pred
rodič
commit
293f4f51a2
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  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)