From 5695804e273da3a3baccf4dbc7a087578264b3c1 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Wed, 25 Oct 2023 10:49:49 +0800 Subject: [PATCH] add comment --- vyper/semantics/types/subscriptable.py | 2 ++ 1 file changed, 2 insertions(+) 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)