;;; Derive the type to be the type specifier which is the Nth arg,
;;; with the additional restriptions noted in the CLHS for STRING and
-;;; SIMPLE-STRING.
+;;; SIMPLE-STRING, defined to specialize on CHARACTER, and for VECTOR
+;;; (under the page for MAKE-SEQUENCE).
(defun creation-result-type-specifier-nth-arg (n)
(lambda (call)
(declare (type combination call))
(declare (ignore simple-string))
(careful-specifier-type
`(simple-array character ,@(if size (list size) '((*)))))))
- (t (careful-specifier-type specifier))))))))
+ (t
+ (let ((ctype (careful-specifier-type specifier)))
+ (if (and (array-type-p ctype)
+ (eq (array-type-specialized-element-type ctype)
+ *wild-type*))
+ ;; I don't think I'm allowed to modify what I get
+ ;; back from SPECIFIER-TYPE; it is, after all,
+ ;; cached. Better copy it, then.
+ (let ((real-ctype (copy-structure ctype)))
+ (setf (array-type-element-type real-ctype)
+ *universal-type*
+ (array-type-specialized-element-type real-ctype)
+ *universal-type*)
+ real-ctype)
+ ctype)))))))))
(/show0 "knownfun.lisp end of file")