(if (or res (not errorp))
res
(error 'simple-type-error
+ :datum nil
+ :expected-type 'class
:format-control "class not yet defined:~% ~S"
:format-arguments (list name)))))
(defun (setf find-classoid) (new-value name)
"Make an instance of a condition object using the specified initargs."
;; Note: ANSI specifies no exceptional situations in this function.
;; signalling simple-type-error would not be wrong.
- (let* ((thing (if (symbolp thing)
- (find-classoid thing)
+ (let* ((thing (or (and (symbolp thing) (find-classoid thing nil))
thing))
(class (typecase thing
(condition-classoid thing)
(funcall (get-coerced-cmt-entry char *readtable*)
stream
char))))
- (when (and retval (not *read-suppress*))
- (rplacd retval nil))))
+ (if retval (rplacd retval nil))))
(defun read (&optional (stream *standard-input*)
(eof-error-p t)
(do ((char (flush-whitespace input-stream)
(flush-whitespace input-stream))
(retlist ()))
- ((char= char endchar) (nreverse retlist))
+ ((char= char endchar) (unless *read-suppress* (nreverse retlist)))
(setq retlist (nconc (read-maybe-nothing input-stream char) retlist))))
\f
;;;; basic readmacro definitions
(multiple-value-bind (res err)
(ignore-errors (apply #'error args))
(assert (not res))
- (assert (typep err 'type-error)))))
+ (assert (typep err 'type-error))
+ (assert (not (nth-value 1 (ignore-errors
+ (type-error-datum err)))))
+ (assert (not (nth-value 1 (ignore-errors
+ (type-error-expected-type err))))))))
(test '#:no-such-condition)
(test nil)
(test t)
(test 42)
(test (make-instance 'standard-object)))
-
(multiple-value-bind (res err) (ignore-errors (read-from-string ""))
(assert (not res))
(assert (typep err 'end-of-file)))
+
+(assert (equal '((0 . "A") (1 . "B"))
+ (coerce (read-from-string "#((0 . \"A\") (1 . \"B\"))")
+ 'list)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.16.4"
+"0.8.16.5"