Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1245 closed defect (fixed)

#(#\a) and "a" do not work interchangeably as keys in an equalp hash table

Reported by: rme Owned by: gb
Priority: normal Milestone:
Component: other Version: trunk
Keywords: Cc:


(defvar h (make-hash-table :test #'equalp)) 
(setf (gethash #(#\a) h) t) 
(gethash "a" h) ; => nil (incorrectly)

This works as expected on the 1.8 release branch (that, is, (gethash "a" h) returns t).

Note that the spec entry for equalp says: "a string and a general array that happens to contain the same characters are equalp".

Change History (4)

comment:1 Changed 5 years ago by rme

r15596 is when %%equalphash was last changed.

comment:2 Changed 5 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

comment:3 Changed 5 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [16305]) Treat strings just like (other) arrays in %%equalphash.

Closes ticket:1245.

comment:4 Changed 5 years ago by rme

(In [16306]) New test (see ticket:1245).

Note: See TracTickets for help on using tickets.