src/codegen-proto.lisp (definst): Don't assume STREAMVAR is `stream'.
[sod] / src / codegen-proto.lisp
index 0d0bc22..65f4745 100644 (file)
           (with-slots ,(mapcar #'list public private) ,inst-var
             (if *print-escape*
                 (print-unreadable-object (,inst-var ,streamvar :type t)
-                  (format stream "~@<~@{~S ~@_~S~^ ~_~}~:>"
+                  (format ,streamvar "~@<~@{~S ~@_~S~^ ~_~}~:>"
                           ,@(mappend #'list keys public)))
                 (block ,code ,@body))))
         ,@(and export `((export '(,class-name ,constructor-name