abcl icon indicating copy to clipboard operation
abcl copied to clipboard

When printing structure, printing of slot values doesn't respect print-object method

Open alanruttenberg opened this issue 3 years ago • 0 comments

(defstruct outside the-inside)

(defstruct inside value)

(defmethod print-object ((o inside) stream)
  (print-unreadable-object (o stream :type t :identity nil)
   (format stream "inside")))

(print (make-outside :the-inside (make-inside)))
;; #S(outside :THE-INSIDE #S(inside :VALUE nil))

(print (outside-the-inside *))
;; #<inside inside>

alanruttenberg avatar Jul 11 '22 21:07 alanruttenberg