浏览代码

Typed primitive subtraction result fix

Brian Fiete 3 年之前
父节点
当前提交
c6399519c8
共有 1 个文件被更改,包括 1 次插入1 次删除
  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();
 
-		if (binaryOp == BfBinaryOp_Subtract)
+		if ((binaryOp == BfBinaryOp_Subtract) && (otherTypedValue->mType == resultType))
 		{
 			intptr maxDist = 0;
 			auto resultTypeInstance = resultType->ToTypeInstance();