瀏覽代碼

Fixed primitive conversion in binary op

Brian Fiete 4 年之前
父節點
當前提交
20d51e0929
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 2 - 5
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -21141,13 +21141,10 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
 			}
 			
 			auto prevResultType = resultType;
-			if (leftValue.mType->IsPrimitiveType())
+			if ((leftValue.mType->IsPrimitiveType()) && (!rightValue.mType->IsTypedPrimitive()))
 				resultType = leftValue.mType;
-			if (rightValue.mType->IsPrimitiveType())
+			if ((rightValue.mType->IsPrimitiveType()) && (!leftValue.mType->IsTypedPrimitive()))
 				resultType = rightValue.mType;			
-
-			if ((prevResultType->IsTypedPrimitive()) && (resultType->IsPrimitiveType()))
-				explicitCast = true;
 		}
 	}