[racket-dev] [plt] Push #23053: master branch updated

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Sat Jul 16 19:40:16 EDT 2011

On Sat, Jul 16, 2011 at 6:35 PM,  <clklein at racket-lang.org> wrote:
>
> collects/racket/contract/private/arrow.rkt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/racket/contract/private/arrow.rkt
> +++ NEW/collects/racket/contract/private/arrow.rkt
> @@ -235,7 +235,7 @@ v4 todo:
>                                      post ...
>                                      rng-results]
>                                     [args
> -                                     (bad-number-of-results blame val rng-len args)]))))
> +                                     (bad-number-of-results blame val rng-len (length args))]))))
>                            null)])
>           (let* ([min-method-arity (length doms)]
>                  [max-method-arity (+ min-method-arity (length opt-doms))]
> @@ -1863,12 +1863,11 @@ v4 todo:
>     [else
>      passes?]))
>
> -(define (bad-number-of-results blame val rng-len)
> -  (let ([num-values (length rng-len)])
> -    (raise-blame-error blame val
> -                       "expected ~a value~a, returned ~a value~a"
> -                       rng-len (if (= rng-len 1) "" "s")
> -                       num-values (if (= num-values 1) "" "s"))))
> +(define (bad-number-of-results blame val rng-len num-values)
> +  (raise-blame-error blame val
> +                     "expected ~a value~a, returned ~a value~a"
> +                     rng-len (if (= rng-len 1) "" "s")
> +                     num-values (if (= num-values 1) "" "s")))
>
>  ;; timing & size tests
>

I tried to add a test case to
collects/tests/racket/contract-test.rktl, but that file seems broken.
In particular, `test/pos-blame' and `test/neg-blame' pass strings when
`test/spec-failed' expects a symbol. Fixing that mismatch causes
hundreds of existing tests to fail.



Posted on the dev mailing list.