1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed primitive conversion in binary op

This commit is contained in:
Brian Fiete 2021-01-22 07:38:46 -08:00
parent 51771270bd
commit 20d51e0929

View file

@ -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;
}
}