When a return argument is removed it does not remove them from the return statements.
It seems equally tricky detecting where the ZERO value should be added as it is to be removed. Seems to me having these working in both directions will be very useful.
I personally would make it detecting if the current return statement fits the pattern:
ZERO1, ..., ZEROn, error and in this case replace it - in both directions - and I would not touch any of the others, because it makes it error prone.
When a return argument is removed it does not remove them from the return statements.
It seems equally tricky detecting where the ZERO value should be added as it is to be removed. Seems to me having these working in both directions will be very useful.
I personally would make it detecting if the current return statement fits the pattern: ZERO1, ..., ZEROn, error and in this case replace it - in both directions - and I would not touch any of the others, because it makes it error prone.