Accessor redefinition fails because of old accessor name

Bug #309066 reported by Nikodemus Siivola
2
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

When redefining an accessor, SB-PCL::FIX-SLOT-ACCESSORS may try to
find the generic function named by the old accessor name using
ENSURE-GENERIC-FUNCTION and then remove the old accessor's method in
the GF. If the old name does not name a function, or if the old name
does not name a generic function, no attempt to find the GF or remove
any methods is made.

However, if an unrelated GF with an incompatible lambda list exists,
the class redefinition will fail when SB-PCL::REMOVE-READER-METHOD
tries to find and remove a method with an incompatible lambda list
from the unrelated generic function.

If Nikodemus understands this bug correctly, this has been fixed somewhere
in the 0.8.21.45 - 1.0.23 interval. Test-case below.

(defclass foo ()
  ((slot :accessor foo-slot)))

(fmakunbound 'foo-slot)

(defgeneric foo-slot (x y z))

(defclass foo ()
  ((slot :accessor foo-slot-value)))

Tags: pcl
description: updated
Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
description: updated
Changed in sbcl:
status: Confirmed → Invalid
Changed in sbcl:
status: Invalid → Confirmed
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Test-case works in 1.0.23.

Changed in sbcl:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.