Forráskód Böngészése

Typed primitive subtraction result fix

Brian Fiete 3 éve
szülő
commit
c6399519c8
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -23712,7 +23712,7 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
 
 
 		auto underlyingType = resultType->GetUnderlyingType();
 		auto underlyingType = resultType->GetUnderlyingType();
 
 
-		if (binaryOp == BfBinaryOp_Subtract)
+		if ((binaryOp == BfBinaryOp_Subtract) && (otherTypedValue->mType == resultType))
 		{
 		{
 			intptr maxDist = 0;
 			intptr maxDist = 0;
 			auto resultTypeInstance = resultType->ToTypeInstance();
 			auto resultTypeInstance = resultType->ToTypeInstance();