diff --git a/collects/scheme/private/contract.ss b/collects/scheme/private/contract.ss index 183ea1117c..21edc914fa 100644 --- a/collects/scheme/private/contract.ss +++ b/collects/scheme/private/contract.ss @@ -254,11 +254,6 @@ improve method arity mismatch contract violation error messages? (quote-syntax contract-id) (quote-syntax id) blame-str)) ...)))))] - [(_ #:type type blame (arg ...) body0 body ...) - (identifier? #'blame) - (raise-syntax-error 'with-contract - "expected identifier for type" - #'type)] [(_ #:type type blame (arg ...) body0 body ...) (raise-syntax-error 'with-contract "expected identifier for blame" @@ -278,6 +273,11 @@ improve method arity mismatch contract violation error messages? (raise-syntax-error 'with-contract "expected identifier for blame" #'args)] + [(_ #:type type etc ...) + (not (identifier? #'type)) + (raise-syntax-error 'with-contract + "expected identifier for type" + #'type)] [(_ #:type type blame) (raise-syntax-error 'with-contract "only blame"