1.0.23.26: AMOPly correct defaulting of direct superclasses
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 5 Dec 2008 13:47:37 +0000 (13:47 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 5 Dec 2008 13:47:37 +0000 (13:47 +0000)
  "The class standard-object is the default direct superclass of the
  class standard-class. When an instance of the class standard-class
  is created, and no direct superclasses are explicitly specified, it
  defaults to the class standard-object."

  "The same is true for funcallable-standard-class and
  funcallable-standard-object."

  * Add :DEFAULT-INITARGS to that effect.

NEWS
src/pcl/defs.lisp
tests/mop.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index ea3c281..9e95efb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,9 @@
   * bug fix: SET-DISPATCH-MACRO-CHARACTER accepts NIL as the readtable
     designator, and returns T instead of the function. (thanks to
     Tobias Rittweiler)
+  * bug fix: direct superclasses of STANDARD-CLASS and
+    FUNCALLABLE-STANDARD-CLASS now default to STANDARD-OBJECT and
+    FUNCALLABLE-STANDARD-OBJECT as required by AMOP.
 
 changes in sbcl-1.0.23 relative to 1.0.22:
   * enhancement: when disassembling method functions, disassembly
index 674519e..c6908d6 100644 (file)
   ())
 
 (defclass standard-class (std-class)
-  ())
+  ()
+  (:default-initargs
+   :direct-superclasses (list *the-class-standard-object*)))
 
 (defclass funcallable-standard-class (std-class)
-  ())
+  ()
+  (:default-initargs
+   :direct-superclasses (list *the-class-funcallable-standard-object*)))
 
 (defclass forward-referenced-class (pcl-class) ())
 
index c443cef..cb60b25 100644 (file)
@@ -79,3 +79,9 @@
           for class = (find-class class-name)
           for results = (test-class-slots class)
           when results do (cerror "continue" "~A" results))))
+
+;;; AMOP says these are the defaults
+(assert (equal (list (find-class 'standard-object))
+               (sb-mop:class-direct-superclasses (make-instance 'standard-class))))
+(assert (equal (list (find-class 'sb-mop:funcallable-standard-object))
+               (sb-mop:class-direct-superclasses (make-instance 'sb-mop:funcallable-standard-class))))
index d7d3aaf..a03a8a4 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.23.25"
+"1.0.23.26"