diff --git a/vyper/semantics/types/subscriptable.py b/vyper/semantics/types/subscriptable.py index 3faaf54509..967991ce76 100644 --- a/vyper/semantics/types/subscriptable.py +++ b/vyper/semantics/types/subscriptable.py @@ -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)