Commit e451ddd4 authored by pfdietz's avatar pfdietz

Add a test for coerce in the case that the element type of the target vector...

Add a test for coerce in the case that the element type of the target vector type cannot be determined
parent 71c3444e
......@@ -179,3 +179,22 @@
(signals-error (locally (coerce nil 'cons) t) type-error)
t)
(deftest coerce.error.10
(let* ((tp1 '(vector character))
(tp2 `(vector t))
(tp3 `(or ,tp1 ,tp2)))
(if (not (subtypep tp3 'vector))
t
(handler-case
(eval `(coerce '(#\a #\b #\c) ',tp3))
(type-error (c)
(cond
((typep (type-error-datum c)
(type-error-expected-type c))
`((typep ',(type-error-datum c)
',(type-error-expected-type c))
"==>" true))
(t t)))
(error (c) (declare (ignore c)) t))))
t)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment