Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Oct 25, 2023
1 parent e5524c3 commit 5695804
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vyper/semantics/types/subscriptable.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ def from_annotation(cls, node: vy_ast.Subscript) -> "DArrayT":

value_type = type_from_annotation(node.slice.value.elements[0])
if not value_type._as_darray:
# TODO: this is currently not reachable because all instantiable types are set to True
# and non-instantiable types like events are caught by `type_from_annotation`
raise StructureException(f"Arrays of {value_type} are not allowed", node)

return cls(value_type, max_length)
Expand Down

0 comments on commit 5695804

Please sign in to comment.