DEFSTRUCT :INCLUDE option does not accept symbols as slot descriptions

Bug #2028875 reported by Jan Moringen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

What I did:

  (defstruct bar (x 1))
  (defstruct (foo (:include bar x)))

What happens:
SBCL signals an error "The value X is not of type LIST".

What I expected to happen:
The structure class FOO should be defined with a slot X that has no initial value according to this passage in the specification entry for DEFSTRUCT:

  (:include included-structure-name {slot-description}*)
  Each slot-description must have a slot-name that is the same as that of some slot in the included
  structure. If a slot-description has no slot-initform, then in the new structure the slot has no initial value.

Note
The error is signaled in ENSURE-NON-STANDARD-CLASS which applies CAR to the slot descriptions in the :INCLUDE option.

SBCL version
2.3.6.debian

uname -a
Linux al 6.3.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.3.11-1 (2023-07-01) x86_64 GNU/Linux

*FEATURES*
(:BORDEAUX-THREADS :GLOBAL-VARS :THREAD-SUPPORT :CLOSER-MOP :SWANK
 ALEXANDRIA::SEQUENCE-EMPTYP :QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3
 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR
 :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX
 :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB
 :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

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.