Ticket #973 (new defect)

Opened 3 years ago

Lambda list destructuring not strict enough

Reported by: jlahd Owned by:
Priority: minor Milestone:
Component: ANSI CL Compliance Version: 1.8
Keywords: Cc:

Description

Destructuring of lambda lists that contain &rest in a subexpression does not catch malformed input as it should:

? (defmacro foo ((&rest a) b) `(list ',a ',b))
FOO
? (foo (1) 2)
((1) 2)  ; as expected
? (foo 1 2)
(1 2)  ; should generate an error

destructuring-bind behaves the same way:

? (destructuring-bind ((&rest foo) bar) '((1) 2) (list foo bar))
((1) 2)
? (destructuring-bind ((&rest foo) bar) '(1 2) (list foo bar))
(1 2)
Note: See TracTickets for help on using tickets.