slot-definitions must retain the generic functions of accessors

Bug #309085 reported by Nikodemus Siivola
2
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Low
Unassigned

Bug Description

  reported by Tony Martinez:
    (defclass foo () ((bar :reader foo-bar)))
    (defun foo-bar (x) x)
    (defclass foo () ((bar :reader get-bar))) ; => error, should work

  Note: just punting the accessor removal if the fdefinition
  is not a generic function is not enough:

   (defclass foo () ((bar :reader foo-bar)))
   (defvar *reader* #'foo-bar)
   (defun foo-bar (x) x)
   (defclass foo () ((bar :initform 'ok :reader get-bar)))
   (funcall *reader* (make-instance 'foo)) ; should be an error, since
                                           ; the method must be removed
                                           ; by the class redefinition

See also bug #309066.

Tags: pcl
description: updated
Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
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.