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

Fixed primitive conversion in binary op

Brian Fiete 4 éve
szülő
commit
20d51e0929
1 módosított fájl, 2 hozzáadás és 5 törlés
  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;
 			auto prevResultType = resultType;
-			if (leftValue.mType->IsPrimitiveType())
+			if ((leftValue.mType->IsPrimitiveType()) && (!rightValue.mType->IsTypedPrimitive()))
 				resultType = leftValue.mType;
 				resultType = leftValue.mType;
-			if (rightValue.mType->IsPrimitiveType())
+			if ((rightValue.mType->IsPrimitiveType()) && (!leftValue.mType->IsTypedPrimitive()))
 				resultType = rightValue.mType;			
 				resultType = rightValue.mType;			
-
-			if ((prevResultType->IsTypedPrimitive()) && (resultType->IsPrimitiveType()))
-				explicitCast = true;
 		}
 		}
 	}
 	}