Plaster

common-lisp
(defstruct entity) (defstruct node (parent nil :type entity) (children nil :type list)) (defun reparent-node (node) (let ((parent (node-parent node))) (setf (node-children parent) (node-children parent)))) ; in: DEFUN REPARENT-NODE ; (SETF (NODE-CHILDREN PARENT) (NODE-CHILDREN PARENT)) ; --> SB-KERNEL:%INSTANCE-SET ; ==> ; (THE NODE PARENT) ; ; caught WARNING: ; Derived type of PARENT is ; (VALUES ENTITY &OPTIONAL), ; conflicting with its asserted type ; COMMON-LISP-USER::NODE. ; See also: ; The SBCL Manual, Node "Handling of Types" ; ; compilation unit finished ; caught 1 WARNING condition