destructuring-bind on an atom results in wrong error message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Douglas Katzman |
Bug Description
(defun foo ()
(let ((bar 42))
(destructur
baz)))
; error while parsing arguments to NIL DESTRUCTURING-BIND:
; dotted keyword/value list: 42
The error message should be fixed, since 42 is not a dotted list.
The value is constant and destructuring-bind could emit a compile-time warning.
I believe destructuring-bind needs to be updated for the case when its second argument is constantp.
macro expansion:
(defun foo ()
(let ((bar 42))
(LET* ((#:G557 (SB-C::
(#:G558 (SB-C::DS-GETF #:G557 ':BAZ))
(BAZ
(IF (NOT (EQL #:G558 0))
BAZ)))
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Changed the error message in https:/ /sourceforge. net/p/sbcl/ sbcl/ci/ 143d47eeca22fad 26404f26101510d 613bda20ad/
Not sure what "updated for the case when ... constantp" means - the macro works fine.
("could" and "needs to" are quite different claims).