Changeset 13827


Ignore:
Timestamp:
01/29/12 22:47:09 (9 years ago)
Author:
rschlatte
Message:

Fix ansi tests class-0309, class-0310.1

... ensure-class now redefines a class found by (FIND-CLASS NAME) only

if NAME is eql to (CLASS-NAME CLASS) as well.

File:
1 edited

Legend:

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

    r13818 r13827  
    26572657 ;;; AMOP pg. 182
    26582658(defun ensure-class (name &rest all-keys &key &allow-other-keys)
    2659   (apply #'ensure-class-using-class (find-class name nil) name all-keys))
     2659  (let ((class (find-class name nil)))
     2660    ;; CLHS DEFCLASS: "If a class with the same proper name already
     2661    ;; exists [...] the existing class is redefined."  Ansi-tests
     2662    ;; CLASS-0309 and CLASS-0310.1 demand this behavior.
     2663    (if (and class (eql (class-name class) name))
     2664        (apply #'ensure-class-using-class class name all-keys)
     2665        (apply #'ensure-class-using-class nil name all-keys))))
    26602666
    26612667;;; AMOP pg. 183ff.
Note: See TracChangeset for help on using the changeset viewer.