Fix wrong type declaration

This commit is contained in:
Douglas Katzman 2026-03-23 23:01:41 -04:00
parent ff39333e8d
commit aa847135d4
2 changed files with 9 additions and 1 deletions

View file

@ -202,7 +202,7 @@
(setf (aref result index) character)
(incf index))
(output-string (string)
(declare (type (simple-array character 1) string))
(declare (string string))
(setf (subseq result index) string)
(incf index (length string)))
(unparse-fragment (fragment)

View file

@ -126,6 +126,14 @@
(with-open-file (i "tests/filesys.pure.lisp")
(assert i))))
;;; The OPEN tests would fail for the wrong reason when the supplied pathname parts
;;; were simple-base-string. The unparser expected simple-character-string
;;; so it signaled a type-error instead of file-error.
(with-test (:name :unparse-simple-base-string-wild)
(assert (string= (sb-impl::unparse-physical-file
(pathname (coerce "flub*.txt" 'simple-base-string)) #\^)
"flub*.txt")))
;;; OPEN, LOAD and friends should signal an error of type FILE-ERROR
;;; if they are fed wild pathname designators; firstly, with wild
;;; pathnames that don't correspond to any files: