Skip to content

Explicitly disallow iteration of list of structs#2228

Merged
fubuloubu merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-iter-structs
Nov 27, 2020
Merged

Explicitly disallow iteration of list of structs#2228
fubuloubu merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-iter-structs

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Explicitly disallow iteration of a list of structs

Fixes #2223

How I did it

Add a check within the type checking pass. This behaviour is disallowed in parser, but without the exception in type checking it raises a CompilerPanic

How to verify it

Run the tests. I added a new test to verify this behavior.

Cute Animal Picture

image

@codecov-io

codecov-io commented Nov 27, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2228 (19471fb) into master (3c5a809) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2228   +/-   ##
=======================================
  Coverage   85.35%   85.36%           
=======================================
  Files          84       84           
  Lines        8536     8539    +3     
  Branches     2062     2063    +1     
=======================================
+ Hits         7286     7289    +3     
  Misses        744      744           
  Partials      506      506           
Impacted Files Coverage Δ
vyper/context/validation/local.py 90.20% <100.00%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c5a809...19471fb. Read the comment docs.

@fubuloubu fubuloubu merged commit 3f7b622 into vyperlang:master Nov 27, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-iter-structs branch November 27, 2020 13:13
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.

Unhandled error in my code

3 participants