Skip to content

Commit

Permalink
fix compare_type
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Nov 12, 2023
1 parent 8e8f204 commit 6d29d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vyper/semantics/types/bytestrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ def compare_type(self, other):
if self._length is not None:
return True

# if both are non-literals and zero length, then the bytestring length
# if both are non-literals and zero/None length, then the bytestring length
# cannot be derived and it is likely to be a syntax error, so we defer
# the syntax error to be handled downstream for better error messages
if self._length == other._length == 0:
if self._length == other._length and not self._length:
return True

return other.compare_type(self)
Expand Down

0 comments on commit 6d29d1b

Please sign in to comment.