slot-definitions must retain the generic functions of accessors

Bug #309085 reported by Nikodemus Siivola on 2008-12-17
2
Affects Status Importance Assigned to Milestone
SBCL
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 Edit Tag help
description: updated
Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers