Ignore:
Timestamp:
Apr 8, 2008, 3:17:29 AM (13 years ago)
Author:
gz
Message:

make defclass check for illegal class options (ticket #271)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/macros.lisp

    r8996 r9049  
    19621962        (let* ((direct-superclasses superclasses)
    19631963               (direct-slot-specs (mapcar #'canonicalize-slot-spec slots))
    1964                (other-options (apply #'append (mapcar #'canonicalize-defclass-option class-options ))))
     1964               (other-options (apply #'append (mapcar #'canonicalize-defclass-option class-options )))
     1965               (keyvect (class-keyvect class-name other-options)))
     1966          (when (vectorp keyvect)
     1967            (let ((illegal (loop for arg in other-options by #'cddr
     1968                              as key = (if (quoted-form-p arg) (%cadr arg) arg)
     1969                              unless (or (eq key :metaclass) (find key keyvect)) collect key)))
     1970              (when illegal
     1971                (signal-program-error "Class option~p~{ ~s~} is not one of ~s"
     1972                                      (length illegal) illegal keyvect))))
    19651973          `(progn
    19661974            (eval-when (:compile-toplevel)
Note: See TracChangeset for help on using the changeset viewer.