Fix equality check for binary operations

Multiplication and addition are commutative binary operations, where the
equality between the operands has to be also checked in switched order.
By mistake, the operands were not compared with the other binary
operation, which is fixed by this commit.
This commit is contained in:
Patrick Lühne 2018-05-03 16:52:29 +02:00
parent c84ae51ff2
commit 7013b9ea54
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -268,8 +268,8 @@ struct TermEqualityVisitor
return Tristate::Unknown; return Tristate::Unknown;
} }
if (equal(binaryOperation.left, binaryOperation.right) == Tristate::True if (equal(binaryOperation.left, otherBinaryOperation.right) == Tristate::True
&& equal(binaryOperation.right, binaryOperation.left) == Tristate::True) && equal(binaryOperation.right, otherBinaryOperation.left) == Tristate::True)
{ {
return Tristate::True; return Tristate::True;
} }