From 594d28d2674c7617c7e9b4f5c0430cae7d549f48 Mon Sep 17 00:00:00 2001
From: Chris <Christopher.Happe@uni-duesseldorf.de>
Date: Tue, 13 Apr 2021 13:07:18 +0200
Subject: [PATCH] Add isinstance check to BBoolean to make more Tests pass

---
 .../src/main/python_magicstack_immutable/btypes/BBoolean.py     | 2 ++
 1 file changed, 2 insertions(+)

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 bbb1bfef1..8aebfffc8 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':
-- 
GitLab