Skip to content

Commit

Permalink
closes PR 10779
Browse files Browse the repository at this point in the history
  • Loading branch information
rfindler committed Sep 17, 2010
1 parent ce211ac commit 04defa4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions collects/racket/contract/private/base.rkt
Expand Up @@ -13,7 +13,7 @@ improve method arity mismatch contract violation error messages?
recursive-contract
current-contract-region)

(require (for-syntax racket/base)
(require (for-syntax racket/base syntax/name)
racket/stxparam
unstable/srcloc
unstable/location
Expand All @@ -30,8 +30,11 @@ improve method arity mismatch contract violation error messages?
(syntax/loc stx
(apply-contract c v pos neg name loc (current-contract-region)))]
[(_ c v pos neg)
(syntax/loc stx
(apply-contract c v pos neg #f (build-source-location #f) (current-contract-region)))]
(with-syntax ([name (syntax-local-infer-name stx)])
(syntax/loc stx
(apply-contract c v pos neg 'name
(build-source-location #f)
(current-contract-region))))]
[(_ c v pos neg src)
(raise-syntax-error 'contract
(string-append
Expand Down

0 comments on commit 04defa4

Please sign in to comment.