Skip to content

Commit

Permalink
use length instead of _length
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed May 6, 2023
1 parent 7fcbacd commit 36028c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyper/semantics/analysis/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 36028c2

Please sign in to comment.