1.0.1.4:
[sbcl.git] / src / compiler / compiler-deftype.lisp
index 20b08b5..322b06b 100644 (file)
 (/show0 "compiler-deftype.lisp 14")
 
 (defun %compiler-deftype (name expander &optional doc)
+  (with-single-package-locked-error
+      (:symbol name "defining ~A as a type specifier"))
   (ecase (info :type :kind name)
     (:primitive
      (when *type-system-initialized*
        (error "illegal to redefine standard type: ~S" name)))
     (:instance
      (warn "The class ~S is being redefined to be a DEFTYPE." name)
-     (undefine-structure (layout-info (class-layout (sb!xc:find-class name))))
-     (setf (class-cell-class (find-class-cell name)) nil)
+     (undefine-structure (layout-info (classoid-layout (find-classoid name))))
+     (setf (classoid-cell-classoid (find-classoid-cell name)) nil)
      (setf (info :type :compiler-layout name) nil)
      (setf (info :type :kind name) :defined))
     (:defined