From 1bdeccc3b80d9235326c94a0455d4d90c9bdad24 Mon Sep 17 00:00:00 2001 From: Robin Ole Heinemann Date: Thu, 24 Apr 2025 15:49:19 +0200 Subject: [PATCH] lib.wiring: make FlippedInterface hashable --- amaranth/lib/wiring.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/amaranth/lib/wiring.py b/amaranth/lib/wiring.py index 1122a625f..17a02a442 100644 --- a/amaranth/lib/wiring.py +++ b/amaranth/lib/wiring.py @@ -1277,6 +1277,9 @@ def __eq__(self, other): """ return type(self) is type(other) and self.__unflipped == other.__unflipped + def __hash__(self): + return hash(self.__unflipped) + # See the note in `FlippedSignature`. In addition, these accessors also handle flipping of # an interface member.