diff --git a/pkgs/racket-test/tests/racket/contract/arrow-i.rkt b/pkgs/racket-test/tests/racket/contract/arrow-i.rkt index 4b74596d9e..0c67fa2fdd 100644 --- a/pkgs/racket-test/tests/racket/contract/arrow-i.rkt +++ b/pkgs/racket-test/tests/racket/contract/arrow-i.rkt @@ -1790,6 +1790,14 @@ 'pos 'neg) 1)) + + (test/neg-blame + '->i-neg-party-is-being-passed-properly + '((contract (-> (->i () any) any) + (λ (x) 1) + 'pos + 'neg) + 0)) ;; this used to cause a runtime error in the code that parses ->i (test/no-error '(->i ([x () any/c] [y (x) any/c]) any)) diff --git a/racket/collects/racket/contract/private/arr-i.rkt b/racket/collects/racket/contract/private/arr-i.rkt index 3f2c07dd73..11156eef25 100644 --- a/racket/collects/racket/contract/private/arr-i.rkt +++ b/racket/collects/racket/contract/private/arr-i.rkt @@ -83,17 +83,17 @@ (rng-proj (blame-add-context indy-rng-blame (format "the ~a result of" (car rng-pr)))))) (list* c-or-i-procedure - (λ (val mtd?) + (λ (val mtd? neg-party) (if has-rest (check-procedure/more val mtd? (->i-mandatory-args ctc) (->i-mandatory-kwds ctc) (->i-opt-kwds ctc) - blame #f) + blame neg-party) (check-procedure val mtd? (->i-mandatory-args ctc) (->i-opt-args ctc) (->i-mandatory-kwds ctc) (->i-opt-kwds ctc) - blame #f))) + blame neg-party))) ctc blame swapped-blame ;; used by the #:pre and #:post checking (append blames @@ -969,7 +969,7 @@ evaluted left-to-right.) #`(λ #,wrapper-proc-arglist (λ (val neg-party) (define blame+neg-party (cons blame neg-party)) - (chk val #,method?) + (chk val #,method? neg-party) (c-or-i-procedure val (let ([arg-checker