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:
parent
51771270bd
commit
20d51e0929
1 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue