Fix for newer SBCL version
[clsql.git] / sql / metaclasses.lisp
index 530c674c55f6f7da589180bc618d731b0aa283bb..f6bbd3f68369ca2e065741e5abbccb92989893c2 100644 (file)
@@ -526,6 +526,12 @@ implementations."
 
          (setf (specified-type esd)
                (delistify-dsd (specified-type dsd)))
+         ;; In older SBCL's the type-check-function is computed at
+         ;; defclass expansion, which is too early for the CLSQL type
+         ;; conversion to take place. This gets rid of it. It's ugly
+         ;; but it's better than nothing -wcp10/4/10.
+         #+(and sbcl #.(cl:if (cl:find-symbol "%TYPE-CHECK-FUNCTION" :sb-pcl) '(and) '(or)))
+         (setf (slot-value esd 'sb-pcl::%type-check-function) nil)
 
          )
         ;; all other slots