Skip to content

Conversation

@stilscher
Copy link
Member

As described in #574 it leads to an exception during the updating of ids if a pseudo return node is matched with a normal return node during CFG comparison. The initial test case added by @sim642 actually now worked without any changes, probably because the CFG creation was changed meanwhile to use an existing return node and avoid the creation of pseudo-return nodes when possible.
So I created the test case 02-cfg-comparison/02-added-return-after-exit where the problem was still observable. To fix it, I adjusted the comparison of nodes to only match two return nodes if either both are pseudo-return nodes or both are not. I removed the cfg comparison option from the test's configuration, because with #841 all incremental tests will be tested with both, ast and cfg comparison.

Closes #574

@stilscher stilscher requested a review from sim642 November 16, 2022 17:19
@stilscher stilscher added the bug label Nov 16, 2022
@stilscher stilscher merged commit 62d6e96 into master Nov 17, 2022
@stilscher stilscher deleted the fix-pseudo-ret-comparison branch November 17, 2022 09:28
@sim642 sim642 added this to the v2.1.0 milestone Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle pseudo return node in CFG comparison

2 participants