Subject: bug#38375: closed (Re: bug#38375: 26.3.50; map-contains-key can't detect nil)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 26 Nov 2019 15:45:02 +0000

Your bug report

#38375: 26.3.50; map-contains-key can't detect nil

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
38375: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38375
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#38375: 26.3.50; map-contains-key can't detect nil
From: Michael Heerdegen <[email-masked]>
To: Damien Cassou <[email-masked]>
Cc: [email-masked], Nicolas Petton <[email-masked]>
Date: Tue, 26 Nov 2019 16:44:15 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Damien Cassou <[email-masked]> writes:

> I agree, it is fixed in master.

Ok, closing.  Nonetheless, thanks for reporting.

Michael.

Subject: 26.3.50; map-contains-key can't detect nil
From: Damien Cassou <[email-masked]>
To: [email-masked]
Cc: Nicolas Petton <[email-masked]>
Date: Mon, 25 Nov 2019 18:15:34 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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))))

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill