(defgeneric foo (bar bar)) does not signal an error

Bug #1704114 reported by Michał Herda on 2017-07-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

(defgeneric foo (bar bar)) does not signal an error, which is contrary to the specification because of the repeated variable names. See http://www.lispworks.com/documentation/HyperSpec/Body/03_db.htm

The lambda list in this case shall be an generic-function-lambda-list -- which is a lambda-list -- which does not allow for repeated var names.

This bug is petty, but I almost shot myself in the foot with it. I found a bug in my few months' old macro - it produced code like (defgeneric foo (t t t)) by mistake, where it should have produced (defgeneric foo (bar baz quux)). SBCL did not complain about the macrogenerated code, where it should signal an error, like CCL does for example.

SBCL 1.3.14-debian.
Linux emiherdbox 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux
(:QUICKLISP :SB-BSD-SOCKETS-ADDRINFO :ASDF3.2 :ASDF-PACKAGE-SYSTEM :ASDF3.1
 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :64-BIT
 :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS
 :C-STACK-IS-CONTROL-STACK :COMMON-LISP :COMPACT-INSTANCE-HEADER
 :COMPARE-AND-SWAP-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ELF :FLOAT-EQL-VOPS
 :FP-AND-PC-STANDARD-SAVE :GENCGC :IEEE-FLOATING-POINT :IMMOBILE-CODE
 :IMMOBILE-SPACE :INLINE-CONSTANTS :INTEGER-EQL-VOP :LARGEFILE :LINKAGE-TABLE
 :LINUX :LITTLE-ENDIAN :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
 :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC
 :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :PRECISE-ARG-COUNT-ERROR
 :RAW-INSTANCE-INIT-VOPS :RAW-SIGNED-WORD :SB-AFTER-XC-CORE
 :SB-CORE-COMPRESSION :SB-DOC :SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS
 :SB-SIMD-PACK :SB-SOURCE-LOCATIONS :SB-TEST :SB-THREAD :SB-UNICODE
 :SB-XREF-FOR-INTERNALS :SBCL :STACK-ALLOCATABLE-CLOSURES
 :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS
 :STACK-ALLOCATABLE-VECTORS :STACK-GROWS-DOWNWARD-NOT-UPWARD :SYMBOL-INFO-VOPS
 :UNBIND-N-VOP :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)

Jan Moringen (scymtym) on 2017-07-13
Changed in sbcl:
importance: Undecided → Medium
assignee: nobody → Jan Moringen (scymtym)
status: New → Confirmed
Jan Moringen (scymtym) on 2017-07-16
Changed in sbcl:
status: Confirmed → Fix Committed
Jan Moringen (scymtym) on 2017-07-26
Changed in sbcl:
assignee: Jan Moringen (scymtym) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers