slot-definition-readers on a standard-effective-slot-definition

Bug #496726 reported by Reinout Stevens
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Low
Unassigned

Bug Description

The standard specifies that slot-definition-readers should be specified for standard-direct-slot-defintion (which you get by class-direct-slots), not on standard-effective-slot-definition (which you get by class-slots)

(use-package :sb-mop)
(defclass person ()
  ((name :reader person-name :initarg :name)))

(make-instance 'person :name "Testcase") ;;initialize class

(slot-definition-readers (car (class-slots (find-class 'person))))
;NIL
(slot-definition-readers (car (class-direct-slots (find-class 'person))))
;(PERSON-NAME)

I think the first one should signal an error (or return the same as the 2nd?).
The same with slot-definition-writers

version:
SBCL 1.0.30 and SBCL 1.0.31

output of uname -a:
Linux walrus 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux

Tags: pcl
Revision history for this message
Nikodemus Siivola (nikodemus) wrote : Re: [Bug 496726] [NEW] slot-definition-readers on a standard-effective-slot-definition

 status confirmed
 tag pcl
 importance low

Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Makarov Alexey (alexeys9) wrote :

This patch add initialisation of 'readers' and 'writers' slots of standard-effective-slot-definition.

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.