Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

closes PR 10779

  • Loading branch information...
commit 04defa493767f22c7e9ebd1087dda21cdcf7dbe5 1 parent ce211ac
Robby Findler rfindler authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 collects/racket/contract/private/base.rkt
9 collects/racket/contract/private/base.rkt
View
@@ -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
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.