Changeset 13788


Ignore:
Timestamp:
01/17/12 20:15:55 (10 years ago)
Author:
rschlatte
Message:

move error checking into canonicalize-direct-superclasses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r13787 r13788  
    290290  (let ((classes '()))
    291291    (dolist (class-specifier direct-superclasses)
    292       (if (classp class-specifier)
    293           (push class-specifier classes)
    294           (let ((class (find-class class-specifier nil)))
    295             (unless class
    296               (setf class (make-forward-referenced-class class-specifier)))
    297             (push class classes))))
     292      (let ((class (if (classp class-specifier)
     293                       class-specifier
     294                       (find-class class-specifier nil))))
     295        (unless class
     296          (setf class (make-forward-referenced-class class-specifier)))
     297        (when (and (typep class 'built-in-class)
     298                   (not (member class *extensible-built-in-classes*)))
     299          (error "Attempt to define a subclass of built-in-class ~S."
     300                 class-specifier))
     301        (push class classes)))
    298302    (nreverse classes)))
    299303
     
    791795               :format-control "Duplicate initialization argument name ~S in :DEFAULT-INITARGS."
    792796               :format-arguments (list name)))))
    793   (let ((direct-superclasses (getf all-keys :direct-superclasses)))
    794     (dolist (class direct-superclasses)
    795       (when (and (typep class 'built-in-class)
    796                  (not (member class *extensible-built-in-classes*)))
    797         (error "Attempt to define a subclass of a built-in-class: ~S" class))))
    798797  (let ((old-class (find-class name nil)))
    799798    (cond ((and old-class (eq name (class-name old-class)))
Note: See TracChangeset for help on using the changeset viewer.