GNU bug report logs - #38375
26.3.50; map-contains-key can't detect nil

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Mon, 25 Nov 2019 21:33:43 UTC

Severity: normal

Found in version 26.3.50

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 38375 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Damien Cassou <damien <at> cassou.me>
Cc: Nicolas Petton <nicolas <at> petton.fr>, 38375 <at> debbugs.gnu.org
Subject: Re: bug#38375: 26.3.50; map-contains-key can't detect nil
Date: Tue, 26 Nov 2019 00:34:27 +0100
Damien Cassou <damien <at> cassou.me> writes:

> The code below inserts the pair (nil, 'value) in a hash table. I expect
> `map-contains-key' to return t when passed the key nil as argument.
>
> (ert-deftest test-map-contains-key-with-nil-has-key-in-hashtable ()
>   (let ((map (make-hash-table :test 'equal)))
>     (puthash nil 'value map)
>     (should (map-contains-key map nil))))

This should have been fixed in master with commit 1691a5109
"*lisp/emacs-lisp/map.el: Make the functions generic".  Could you please
check?

Michael.




This bug report was last modified 5 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.