Fixing PR11592

This commit is contained in:
Jay McCarthy 2011-01-07 19:49:42 -07:00
parent f2a9aebba5
commit f77ab71772

View File

@ -352,7 +352,12 @@
;;; far, either the clauses are malformed or the error is completely
;;; unintelligible.
[(_ type-id test-expr clauses ...)
(map validate-clause (syntax->list #'(clauses ...)))]
(begin
(unless (identifier? #'type-id)
(plai-syntax-error 'type-case #'type-id type-case:not-a-type))
(validate-and-remove-type-symbol #'type-id (syntax-local-value #'type-id (λ () #f)))
(andmap validate-clause (syntax->list #'(clauses ...)))
(plai-syntax-error 'type-case stx "Unknown error"))]
[_ (plai-syntax-error 'type-case stx type-case:generic)]))