Merge pull request #1348 from crytic/0xalpharush-patch-2

implement eq for literal
pull/1356/head
Feist Josselin 2 years ago committed by GitHub
commit 5b718a197b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      slither/core/expressions/literal.py

@ -31,3 +31,8 @@ class Literal(Expression):
return str(convert_subdenomination(self._value, self.subdenomination))
# be sure to handle any character
return str(self._value)
def __eq__(self, other):
if not isinstance(other, Literal):
return False
return (self.value, self.subdenomination) == (other.value, other.subdenomination)

Loading…
Cancel
Save