X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=14787f56967a117b1eaeccd3e2f841a626aca2eb;hb=a1007bcf38130a9a08e32f04a69e6836f76329d2;hp=b437d76d5b99d7aeefbb4e269e0ef7fc64738b28;hpb=015c86a5eaaa3d2490d221ae56ffec36d2007529;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index b437d76..14787f5 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -598,5 +598,15 @@ (defclass frc-3 () ()) (assert (typep (make-instance 'frc-1 :a 2) (find-class 'frc-1))) (assert (typep (make-instance 'frc-2 :a 3) (find-class 'frc-2))) + +;;; check that we can define classes with two slots of different names +;;; (even if it STYLE-WARNs). +(defclass odd-name-class () + ((name :initarg :name) + (cl-user::name :initarg :name2))) +(let ((x (make-instance 'odd-name-class :name 1 :name2 2))) + (assert (= (slot-value x 'name) 1)) + (assert (= (slot-value x 'cl-user::name) 2))) + ;;;; success (sb-ext:quit :unix-status 104)