X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=6fcfb213dd3d29f3de037d2899218d9f6e43050d;hb=b20e8cac4dd15882d5e0fda1bcf04c487df1360f;hp=c85ebd08ec6a307c639020ace4fcd95dfb9b9903;hpb=e082422c19768dd7d6e30126740fe7f05cbd603a;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index c85ebd0..6fcfb21 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -2626,3 +2626,21 @@ (multiple-value-bind (res err) (ignore-errors (funcall fun nil)) (assert (not res)) (assert (typep err 'type-error))))) + +(with-test (:name :constant-list-destructuring) + (handler-bind ((sb-ext:compiler-note #'error)) + (progn + (assert (= 10 + (funcall + (compile nil + '(lambda () + (destructuring-bind (a (b c) d) '(1 (2 3) 4) + (+ a b c d))))))) + (assert (eq :feh + (funcall + (compile nil + '(lambda (x) + (or x + (destructuring-bind (a (b c) d) '(1 "foo" 4) + (+ a b c d))))) + :feh))))))