fix: ensure that tuple variable's types belong to the Type class #41
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.
Notes
The "types" of the tuple variable generated from a struct-destructuring assignment are actually strings. For example, the tuple variable generated from the following program has a list of strings instead of a list of types:
Struct destructuring is implemented in a function called
_convert_to_structure_to_list
inconvert.py
. When it encounters structure types, it destructures them and flattens the result into the outer structure's list. When it encounters elementary types, it should include the type in the list, but instead it includes the type'stype
field, which is a string. This PR fixes that by returning theElementaryType
instead of itstype
field.Testing
make test
and verify that all tests succeed./evaluate.sh run 100
intool-eval.sh
and verify that all projects succeedRelated Issue
https://github.com/CertiKProject/slither-task/issues/508