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)]))))])])
#`[(vector? #,x)
(case (vector-length #,x)
clauses ...)])]
clauses ...
[else (#,esc)])])]
;; it's a structure
[(box? k)
;; all the rows are structures with the same predicate

View File

@ -571,6 +571,11 @@
[(or (and x 2) (and x 3) (and x 4)) 3]
[_ (values 4 5)])])
(list x y)))
(comp 'bad
(match #(1)
[(vector a b) a]
[else 'bad]))
))