From 1d6efae4e834eea22e3e46598e86d76e1783f9b3 Mon Sep 17 00:00:00 2001 From: webthethird Date: Thu, 29 Dec 2022 13:55:28 -0600 Subject: [PATCH] Implement `Structure.__hash__()` --- slither/core/declarations/structure.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slither/core/declarations/structure.py b/slither/core/declarations/structure.py index b94ed4f50..5b514e3cb 100644 --- a/slither/core/declarations/structure.py +++ b/slither/core/declarations/structure.py @@ -62,3 +62,6 @@ class Structure(SourceMapping): if str(other_elem.type) != str(elem.type) or other_elem.name != elem.name: return False return self.name == other.name + + def __hash__(self): + return hash(self.name)