0.8.21.28:
[sbcl.git] / src / compiler / parse-lambda-list.lisp
index 5f5bdc0..6109cbd 100644 (file)
                (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
               (&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)))