Fix handling of wrong size vectors.

Add tests.
Fixes PR9885.

svn: r12334
This commit is contained in:
Sam Tobin-Hochstadt 2008-11-06 20:23:40 +00:00
parent f076494c48
commit c4deb8e5e7
2 changed files with 7 additions and 1 deletions

View File

@ -108,7 +108,8 @@
body)]))))])]) body)]))))])])
#`[(vector? #,x) #`[(vector? #,x)
(case (vector-length #,x) (case (vector-length #,x)
clauses ...)])] clauses ...
[else (#,esc)])])]
;; it's a structure ;; it's a structure
[(box? k) [(box? k)
;; all the rows are structures with the same predicate ;; all the rows are structures with the same predicate

View File

@ -572,5 +572,10 @@
[_ (values 4 5)])]) [_ (values 4 5)])])
(list x y))) (list x y)))
(comp 'bad
(match #(1)
[(vector a b) a]
[else 'bad]))
)) ))