diff --git a/btypes_primitives/src/main/python_magicstack_immutable/btypes/BBoolean.py b/btypes_primitives/src/main/python_magicstack_immutable/btypes/BBoolean.py index bbb1bfef13df075ff713a51ef1641610698d0180..8aebfffc8dd68f0fef334ac5b9b6078b218ec657 100644 --- a/btypes_primitives/src/main/python_magicstack_immutable/btypes/BBoolean.py +++ b/btypes_primitives/src/main/python_magicstack_immutable/btypes/BBoolean.py @@ -32,6 +32,8 @@ class BBoolean: return BBoolean(self.__value ^ other.__value) def __eq__(self, other: 'BBoolean') -> 'BBoolean': + if not isinstance(other, BBoolean): + return BBoolean(False) return BBoolean(self.__value == other.__value) def __ne__(self, other: 'BBoolean') -> 'BBoolean':