diff --git a/slither/core/expressions/literal.py b/slither/core/expressions/literal.py index ffda38b4d..3303a9aa8 100644 --- a/slither/core/expressions/literal.py +++ b/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)