~ chicken-core (chicken-5) f9c5c6945c1f1af26f585f1151c8f2711dfc8e13
commit f9c5c6945c1f1af26f585f1151c8f2711dfc8e13
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Wed Dec 21 11:50:34 2011 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Wed Dec 21 11:50:34 2011 +0100
handle invalid type in 'the' form; fix bug in pair-type validation
diff --git a/scrutinizer.scm b/scrutinizer.scm
index a3e2ad4e..a0ac015a 100755
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -741,6 +741,8 @@
(map (cut resolve <> typeenv) r)))))))
((##core#the)
(let-values (((t pred pure) (validate-type (first params) #f)))
+ (unless t
+ (quit "invalid type specification: ~s" (first params)))
(let ((rt (walk (first subs) e loc dest tail flow ctags)))
(cond ((eq? rt '*))
((null? rt)
@@ -2020,7 +2022,7 @@
((eq? 'pair (car t))
(and (= 3 (length t))
(let ((ts (map validate (cdr t))))
- (and ts `(pair ,@ts)))))
+ (and (every identity ts) `(pair ,@ts)))))
((eq? 'procedure (car t))
(and (pair? (cdr t))
(let* ((name (if (symbol? (cadr t))
Trap