mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed commutability of comparison constraint
This commit is contained in:
parent
cdf5f3b03b
commit
5074b3e2ae
1 changed files with 5 additions and 2 deletions
|
@ -18957,7 +18957,9 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
|
|||
works = true;
|
||||
}
|
||||
}
|
||||
else if ((oppositeBinaryOp != BfBinaryOp_None) && (opConstraint.mBinaryOp == oppositeBinaryOp))
|
||||
|
||||
if (((oppositeBinaryOp != BfBinaryOp_None) && (opConstraint.mBinaryOp == oppositeBinaryOp)) ||
|
||||
(opConstraint.mBinaryOp == BfBinaryOp_Compare))
|
||||
{
|
||||
if ((mModule->CanCast(args[0].mTypedValue, opConstraint.mRightType)) &&
|
||||
(mModule->CanCast(args[1].mTypedValue, opConstraint.mLeftType)))
|
||||
|
@ -18965,7 +18967,8 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod
|
|||
works = true;
|
||||
}
|
||||
}
|
||||
else if ((isComparison) && (opConstraint.mBinaryOp == BfBinaryOp_Compare))
|
||||
|
||||
if ((isComparison) && (opConstraint.mBinaryOp == BfBinaryOp_Compare))
|
||||
{
|
||||
if ((mModule->CanCast(args[0].mTypedValue, opConstraint.mLeftType)) &&
|
||||
(mModule->CanCast(args[1].mTypedValue, opConstraint.mRightType)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue