Fix nested struct array rule generation #915
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up to #830.
This PR ensures that the elements of nested structs up to an arbitrary depth all have
_{i}
indices appended to their names if they correspond to an array element. It also factors out the processing of tuple array components into a separate functionprocess_tuple_array
.This PR also adds a test that exercises the previously missing edge case, which manifested in variables on the LHS and in the
ensures
clause of the#abiCalldata
rule incontract.k
not having proper indexes (..._0
) set.Please note that this test branches on the possible length of dynamically sized
strings
in the calldata, so it is meant to testkontrol build
and is not run during thekontrol prove
stage: