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

fix: guard against iterating over empty list in for loop #3197

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented Dec 16, 2022

What I did

Fix #3144.

How I did it

Check for an empty elements list if iter is a List node.

How to verify it

See tests.

Commit message

fix: guard against iterating over empty list in for loop

Description for the changelog

Guard against iterating over empty list in for loop

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@charles-cooper charles-cooper merged commit 13ebcbe into vyperlang:master Jan 6, 2023
@tserg tserg deleted the fix/empty_list_for branch January 9, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError when iterating on an empty literal array
3 participants