Skip to content

compiler panic when using non type value as iterator annotation #4559

@cyberthirst

Description

@cyberthirst

Version Information

  • vyper Version (output of vyper --version): cef84e8

What's your issue about?

def foo():
    a: DynArray[DynArray[uint256, 10], 10] = []
    for i: DynArray[uint256, 10] in a:
        for j: i in i:
            pass
vyper.exceptions.CompilerPanic: Not a type: VarInfo(typ=DynArray[uint256, 10], location=<DataLocation.UNSET: 'unset'>, modifiability=<Modifiability.RUNTIME_CONSTANT: 'runtime_constant'>, is_public=False, decl_node=vyper.ast.nodes.AnnAssign:
---> 1 def foo():
-------^
     2     a: DynArray[DynArray[uint256, 10], 10] = [])

  contract "tests/custom/test.vy:4", function "foo", line 4:15 
       3     for i: DynArray[uint256, 10] in a:
  ---> 4         for j: i in i:
  ----------------------^
       5             pass


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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions