Skip to content

Commit 52e85e9

Browse files
authored
Undoing optimization CallDecl __eq__
1 parent c107e7b commit 52e85e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/egglog/declarations.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,9 @@ def _cached_hash(self) -> int:
570570
return hash((self.callable, self.args, self.bound_tp_params))
571571

572572
def __eq__(self, other: object) -> bool:
573-
# Override eq to use cached hash for perf
574-
if not isinstance(other, CallDecl):
573+
if not isinstance(other, egglog.declarations.CallDecl):
575574
return False
576-
return hash(self) == hash(other)
575+
return self.callable == other.callable and self.args == other.args and self.bound_tp_params == other.bound_tp_params
577576

578577

579578
@dataclass(frozen=True)

0 commit comments

Comments
 (0)