Add more asserts to aggressively enforce return conventions
You can't get the return value from a RewriteArgs without looking at the return convention. Debug mode will check the return convention during the execution of rewrites. Split "VALID_RETURN" into "HAS_RETURN" and "CAPI_RETURN" since some places used it to mean either. Hopefully this helps keep things clean. There are a lot of places that were implictly assuming a certain return convention, but now that they have to explicitly assume it, the issues are more obvious. Plus they will get checked in the debug builds. Also tried to fix things up while going through and doing this refactoring; I think I found a number of issues.
Showing
test/tests/binop_guarding.py
0 → 100644
Please register or sign in to comment