From 1dc555e0af4ca7863808c49822fa9884bb7de8dc Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 11 Sep 2010 07:48:50 -0500 Subject: [PATCH] fixes _ in contract-names for ->i closes PR 11185 --- collects/racket/contract/private/arr-i.rkt | 4 +++- collects/tests/racket/contract-test.rktl | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/racket/contract/private/arr-i.rkt b/collects/racket/contract/private/arr-i.rkt index 5918f0fa23..62947cd9a9 100644 --- a/collects/racket/contract/private/arr-i.rkt +++ b/collects/racket/contract/private/arr-i.rkt @@ -752,7 +752,9 @@ #,(and (istx-ress an-istx) (for/list ([a-res (in-list (istx-ress an-istx))]) `(,(if (arg/res-vars a-res) 'dep 'nodep) - ,(syntax-e (arg/res-var a-res)) + ,(if (eres? a-res) + '_ + (syntax-e (arg/res-var a-res))) ,(if (arg/res-vars a-res) (map syntax-e (arg/res-vars a-res)) '()) diff --git a/collects/tests/racket/contract-test.rktl b/collects/tests/racket/contract-test.rktl index e0b10c2d85..1b2c3b0753 100644 --- a/collects/tests/racket/contract-test.rktl +++ b/collects/tests/racket/contract-test.rktl @@ -8881,6 +8881,8 @@ so that propagation occurs. (->i () #:pre () #t [q () number?] #:post () #t)) (test-name '(->i ([x integer?]) #:pre (x) ... [q (x) ...] #:post (x) ...) (->i ([x integer?]) #:pre (x) #t [q (x) number?] #:post (x) #t)) + (test-name '(->i ([x real?]) [_ (x) ...]) + (->i ([x real?]) [_ (x) (>/c x)])) (test-name '(case->) (case->)) (test-name '(case-> (-> integer? any) (-> boolean? boolean? any) (-> char? char? char? any))