-
-
Notifications
You must be signed in to change notification settings - Fork 836
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 pop
in iter for
range
#3188
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3188 +/- ##
==========================================
+ Coverage 88.38% 88.40% +0.02%
==========================================
Files 88 88
Lines 11044 11048 +4
Branches 2337 2338 +1
==========================================
+ Hits 9761 9767 +6
+ Misses 826 825 -1
+ Partials 457 456 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
vyper/codegen/expr.py
Outdated
@@ -670,6 +671,12 @@ def parse_Call(self): | |||
darray = Expr(self.expr.func.value, self.context).ir_node | |||
assert len(self.expr.args) == 0 | |||
assert isinstance(darray.typ, DArrayType) | |||
|
|||
if self.context.is_constant(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is the right place to do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should actually be moved to the semantic pass.
What I did
Fix #3172.
How I did it
Pass context to
pop_dyn_array
and check constancy.How to verify it
See tests
Commit message
Description for the changelog
Guard against
pop
in iterfor
rangeCute Animal Picture