Skip to content
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

Recursively check all ValueIds returned by simplify_call match the expected type #6653

Open
TomAFrench opened this issue Nov 29, 2024 · 0 comments

Comments

@TomAFrench
Copy link
Member

We've had another case of simplification of foreign calls resulting in us injecting invalid types into SSA in #6652.

In this PR @asterite raised that we should check that the returned values should have their type checked to catch any reoccurences of this issue. We did a small form of this but it only looks at the top level type, as Ary noted this won't catch any invalid types within nested types such as arrays.

This can be solved by recursively matching on the type and inspecting the inputs to MakeArray instructions so that we can make this guarantee much stronger.

We likely don't want this assertion to make it into release builds as we should have tests covering all these cases and then no user input will be able to trigger this assertion.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant