fix bug in ->i (neg party was getting dropped)
This commit is contained in:
parent
5665fd8a85
commit
816e20b803
|
@ -1791,6 +1791,14 @@
|
|||
'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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user