Skip to content

FORMAT and FORMATTER should accept non-simple strings

Per CLHS http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_format.html and http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_formatter.html non-simple strings should be accepted by FORMAT and FORMATTER. This is not the case in CLISP.

How to reproduce:

(defvar s (make-array 1 :element-type 'character :initial-contents "x" :fill-pointer t))
(format nil s)
(eval `(formatter ,s))

Actual:

*** - SCHAR: argument "x" is not a SIMPLE-STRING

Expected: No error.

Reported by Vibhu Mohindra.