Commits

Armin Rigo committed 0e2f0d9

Test and fix.

Comments (0)

Files changed (2)

rpython/rtyper/rpbc.py

     def ll_str(self, none):
         return llstr("None")
 
+    def get_ll_eq_function(self):
+        return None
+
     def get_ll_hash_function(self):
         return ll_none_hash
 

rpython/rtyper/test/test_rdict.py

         finally:
             lltype._array._check_range = original_check_range
 
+    def test_dict_with_none_key(self):
+        def func(i):
+            d = {None: i}
+            return d[None]
+        res = self.interpret(func, [42])
+        assert res == 42
+
 
 class TestStress: