Changeset 111


Ignore:
Timestamp:
Dec 12, 2003, 1:12:00 PM (21 years ago)
Author:
Gary Byers
Message:

Set TYPE-PREDICATE slot of standard slot definition.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-typesys.lisp

    r80 r111  
    30743074                     (union-ctype-types ctype))))))
    30753075
     3076
     3077;;; Ensure that standard EFFECTIVE-SLOT-DEFINITIONs have a meaningful
     3078;;; type predicate, if we can.
     3079(defmethod shared-initialize :after ((spec effective-slot-definition)
     3080                                     slot-names
     3081                                     &key type
     3082                                     &allow-other-keys)
     3083  (declare (ignore slot-names))
     3084  (unless (eq type t)
     3085    (setf (slot-value spec 'type-predicate)
     3086          (or (and (typep type 'symbol)
     3087                   (type-predicate type))
     3088              (let* ((ctype (specifier-type type)))
     3089                #'(lambda (value) (ctypep value ctype)))))))
Note: See TracChangeset for help on using the changeset viewer.