Fixed visit_if for SymbolicCompare cases#2535
Conversation
There was a problem hiding this comment.
I see what the issue is. Every visit statement method must return a new result in pass_result. If you don't, the statement gets skipped.
Consequently, I think the first two branches will also fail. In a subsequent PR, can you please write a test and fix them?
|
Hmm, I think the first two branches do work. We can obviously get them changed but think about this. Whenever we encounter an if block, something like
Well we have test_gruntz.py on master which are based on the first two conditions we have. So I think we are doing fine, but just to get rid of any unwanted errors we can address this. |
|
Ok. If it works then let it be. I am just surprised that the last case didn't work and I don't see how it is different to the previous two cases. |
The way I addresssed #2532 is by creating a new
Ifnode instead of editing them_testparameter of the old node itself and this works. I think the original code should itself be sufficient but we haven't been able to find the error hence using this.I've added a test for the same.