Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r66876:0e2f0d910e8f Date: 2013-09-09 21:55 +0200 http://bitbucket.org/pypy/pypy/changeset/0e2f0d910e8f/
Log: Test and fix. diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py --- a/rpython/rtyper/rpbc.py +++ b/rpython/rtyper/rpbc.py @@ -596,6 +596,9 @@ 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 diff --git a/rpython/rtyper/test/test_rdict.py b/rpython/rtyper/test/test_rdict.py --- a/rpython/rtyper/test/test_rdict.py +++ b/rpython/rtyper/test/test_rdict.py @@ -1051,6 +1051,13 @@ 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: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit