-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: (rewriting) Fix recursive type conversion in block arguments for nested regions #2871
Conversation
@francescodaghero feel free to also comment/leave a review :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2871 +/- ##
==========================================
- Coverage 89.87% 89.86% -0.01%
==========================================
Files 396 397 +1
Lines 49827 49966 +139
Branches 7683 7713 +30
==========================================
+ Hits 44780 44903 +123
- Misses 3837 3846 +9
- Partials 1210 1217 +7 ☔ View full report in Codecov by Sentry. |
@superlopuh do you think we can merge this without @PapyChacal s approval? It seems like fairly obvious fix to me, but I am not very deep in the intricacies of the TypeConversion stuff. |
Hmm, reading the source code more, it seems that _convert_type_rec is really the thing to call everywhere, and I'm not sure why it wasn't in the first place. There's a check for |
Hmm, yeah fair enough. I am honestly not sure what we want this API to look like exactly, but your change sounds reasonable. |
I will wait for the CI to pass and then merge. |
closes #2857
Solves the issue mentioned there and adds the reported testcase as a regression test.
Before, this was actually quite broken as not applying the recursive rewrite, but the normal rewrite, to the region would actually mean that the produced func_op did not even verify (the
function_type
attribute got rewritten properly, whereas the entry_block args would still have the old type).The reason why the old type was being printed is that the
print_func_op_like
-utility function defaults to printing the entry_block arguments in some cases.