0.8.0.8:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 May 2003 13:32:57 +0000 (13:32 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 May 2003 13:32:57 +0000 (13:32 +0000)
        Some slight MAKE-LOAD-FORM-related fixes
        ... in general, slots can be named by any symbols; DEFCLASS is
                more stringent in its requirements, so move the extra
                checks into the DEFCLASS macro.
        ... now structure slots can be named by keywords again.
        ... make MAKE-LOAD-FORM-SAVING-SLOTS results on structures
                cause the compiler to be less verbose, by using a
                lower-level setter (SB!KERNEL:SLOT-SETTER-LAMBDA-FORM).

[ oops, forgot to commit the tests ]

tests/clos.impure.lisp

index 07e1cdc..2f36ac7 100644 (file)
                          (:default-initargs :a 1)
                          (:default-initargs :a 2)))
   ;; and also BUG 47d, fixed in sbcl-0.8alpha.0.26
-  (assert-program-error (defgeneric if (x))))
+  (assert-program-error (defgeneric if (x)))
+  ;; DEFCLASS should detect an error if slot names aren't suitable as
+  ;; variable names:
+  (assert-program-error (defclass foo009 ()
+                         ((:a :initarg :a))))
+  (assert-program-error (defclass foo010 ()
+                         (("a" :initarg :a))))
+  (assert-program-error (defclass foo011 ()
+                         ((#1a() :initarg :a))))
+  (assert-program-error (defclass foo012 ()
+                         ((t :initarg :t))))
+  (assert-program-error (defclass foo013 () ("a"))))
 \f
 ;;; DOCUMENTATION's argument-precedence-order wasn't being faithfully
 ;;; preserved through the bootstrap process until sbcl-0.7.8.39.