Quellcode durchsuchen

Fixed primitive conversion in binary op

Brian Fiete vor 4 Jahren
Ursprung
Commit
20d51e0929
1 geänderte Dateien mit 2 neuen und 5 gelöschten Zeilen
  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;
 		}
 	}