From 36028c229087bd9f956e742cd847c44888440bf6 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Sat, 6 May 2023 11:35:52 +0800 Subject: [PATCH] use length instead of _length --- vyper/semantics/analysis/annotation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vyper/semantics/analysis/annotation.py b/vyper/semantics/analysis/annotation.py index bb58a28359..22ca923f5e 100644 --- a/vyper/semantics/analysis/annotation.py +++ b/vyper/semantics/analysis/annotation.py @@ -155,7 +155,7 @@ def visit_Call(self, node, type_): # set the length of bytestrings with length 0 (i.e. ABI JSON imports) ret_typ = call_type.return_type if type_: - if isinstance(ret_typ, (BytesT, StringT)) and ret_typ._length == 0: + if isinstance(ret_typ, (BytesT, StringT)) and ret_typ.length == 0: # sanity check assert isinstance(type_, (BytesT, StringT)) call_type.return_type.set_length(type_.length) @@ -165,7 +165,7 @@ def visit_Call(self, node, type_): for orig_typ, propagated_typ in zip( ret_typ.tuple_members(), type_.tuple_members() ): - if isinstance(orig_typ, (BytesT, StringT)) and orig_typ._length == 0: + if isinstance(orig_typ, (BytesT, StringT)) and orig_typ.length == 0: # sanity check assert isinstance(propagated_typ, (BytesT, StringT)) orig_typ.set_length(propagated_typ.length)