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

panic when iterating over static arrays #4461

Open
charles-cooper opened this issue Jan 22, 2025 · 0 comments · May be fixed by #4462
Open

panic when iterating over static arrays #4461

charles-cooper opened this issue Jan 22, 2025 · 0 comments · May be fixed by #4462
Labels
bug - codegen bug - type 0 compiler halts or panics instead of generating code

Comments

@charles-cooper
Copy link
Member

charles-cooper commented Jan 22, 2025

Version Information

  • vyper Version (output of vyper --version): 762eec6

What's your issue about?

following contract panics when compiling:

X: constant(uint24[4]) = [1,2,3,4]

@external
def foo():
    x: uint24 = 0
    for s: uint24 in X:
        x += s

error looks like

Error compiling: tmp/foo.vy
AssertionError

During handling of the above exception, another exception occurred:

vyper.exceptions.CodegenPanic: unhandled exception , parse_For

  contract "tmp/foo.vy:6", function "foo", line 6:4 
       5     x: uint24 = 0
  ---> 6     for s: uint24 in X:
  -----------^
       7         x += s


This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
https://github.com/vyperlang/vyper/issues/new?template=bug.md

How can it be fixed?

Fill this in if you know how to fix it.

@charles-cooper charles-cooper added needs triage needs triage bug - codegen bug - type 0 compiler halts or panics instead of generating code and removed needs triage needs triage labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - codegen bug - type 0 compiler halts or panics instead of generating code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant