From 12b345dc994769350b8777be7f361a4f2fe5d722 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 14 Aug 2010 08:00:13 -0500 Subject: [PATCH] improved the syntax error checking for ->i --- collects/racket/contract/private/arr-i-parse.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/collects/racket/contract/private/arr-i-parse.rkt b/collects/racket/contract/private/arr-i-parse.rkt index 6c916f4b7e..25ef05c1d9 100644 --- a/collects/racket/contract/private/arr-i-parse.rkt +++ b/collects/racket/contract/private/arr-i-parse.rkt @@ -383,6 +383,12 @@ code does the parsing and validation of the syntax. [any (raise-syntax-error #f "cannot have a #:post with any as the range" stx #'post-cond)] [_ (void)]) (values (pre/post (syntax->list #'(id ...)) #'post-cond) #'leftover))] + [(#:post a b . stuff) + (begin + (raise-syntax-error #f "expected a sequence of variables to follow #:post" stx #'a))] + [(#:post a) + (begin + (raise-syntax-error #f "expected a sequence of variables and an expression to follow #:post" stx #'a))] [_ (values #f leftover)])]) (syntax-case leftover () [()