X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fparse-lambda-list.lisp;h=6109cbd082d6f98a16df99d21cf82a57ae76f0d1;hb=5ecef987f3847ed5de8c03f66ef9d8ab468af993;hp=5f5bdc0a51303c2b1a71b079c8a5218290e73819;hpb=3d1f783a15fa74c4cb7cd7065a57ed74904eecbd;p=sbcl.git diff --git a/src/compiler/parse-lambda-list.lisp b/src/compiler/parse-lambda-list.lisp index 5f5bdc0..6109cbd 100644 --- a/src/compiler/parse-lambda-list.lisp +++ b/src/compiler/parse-lambda-list.lisp @@ -84,6 +84,10 @@ (unless (member state '(:required :optional :post-rest :post-more)) (compiler-error "misplaced &KEY in lambda list: ~S" list)) + #-sb-xc-host + (when (optional) + (compiler-style-warn + "&OPTIONAL and &KEY found in the same lambda list: ~S" list)) (setq keyp t state :key)) (&allow-other-keys @@ -96,6 +100,8 @@ (&aux (when (member state '(:rest :more-context :more-count)) (compiler-error "misplaced &AUX in lambda list: ~S" list)) + (when auxp + (compiler-error "multiple &AUX in lambda list: ~S" list)) (setq auxp t state :aux)) (t (bug "unknown LAMBDA-LIST-KEYWORD in lambda list: ~S." arg)))