It's traditional behavior that the assignment operator returns the modified value of the left-hand operator.
For example, ((a=8)==8) is true.
Someone using your code might make that assumption, so if you change this, you better make a very clear note on the documentation.