From: Mark Wooding Date: Sun, 26 Mar 2017 14:16:18 +0000 (+0100) Subject: src/class-make-impl.lisp: Forbid slots with function types. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/eeb8cc3f91402d0b7d78e17e09f69ff2a2b64882?ds=inline src/class-make-impl.lisp: Forbid slots with function types. Pointer-to-function type is fine, of course. --- diff --git a/src/class-make-impl.lisp b/src/class-make-impl.lisp index 7263e44..78f8fed 100644 --- a/src/class-make-impl.lisp +++ b/src/class-make-impl.lisp @@ -66,6 +66,8 @@ (default-slot-from-property (class 'chain-link slot-names) (defmethod make-sod-slot ((class sod-class) name type pset &optional location) (with-default-error-location (location) + (when (typep type 'c-function-type) + (error "Slot declarations cannot have function type")) (let ((slot (make-instance (get-property pset :slot-class :symbol 'sod-slot) :class class