fix bug in ->i (neg party was getting dropped)
This commit is contained in:
parent
5665fd8a85
commit
816e20b803
|
@ -1790,6 +1790,14 @@
|
||||||
'pos
|
'pos
|
||||||
'neg)
|
'neg)
|
||||||
1))
|
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
|
;; 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))
|
(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"
|
(rng-proj (blame-add-context indy-rng-blame (format "the ~a result of"
|
||||||
(car rng-pr))))))
|
(car rng-pr))))))
|
||||||
(list* c-or-i-procedure
|
(list* c-or-i-procedure
|
||||||
(λ (val mtd?)
|
(λ (val mtd? neg-party)
|
||||||
(if has-rest
|
(if has-rest
|
||||||
(check-procedure/more val mtd?
|
(check-procedure/more val mtd?
|
||||||
(->i-mandatory-args ctc)
|
(->i-mandatory-args ctc)
|
||||||
(->i-mandatory-kwds ctc)
|
(->i-mandatory-kwds ctc)
|
||||||
(->i-opt-kwds ctc)
|
(->i-opt-kwds ctc)
|
||||||
blame #f)
|
blame neg-party)
|
||||||
(check-procedure val mtd?
|
(check-procedure val mtd?
|
||||||
(->i-mandatory-args ctc) (->i-opt-args ctc)
|
(->i-mandatory-args ctc) (->i-opt-args ctc)
|
||||||
(->i-mandatory-kwds ctc) (->i-opt-kwds ctc)
|
(->i-mandatory-kwds ctc) (->i-opt-kwds ctc)
|
||||||
blame #f)))
|
blame neg-party)))
|
||||||
ctc
|
ctc
|
||||||
blame swapped-blame ;; used by the #:pre and #:post checking
|
blame swapped-blame ;; used by the #:pre and #:post checking
|
||||||
(append blames
|
(append blames
|
||||||
|
@ -969,7 +969,7 @@ evaluted left-to-right.)
|
||||||
#`(λ #,wrapper-proc-arglist
|
#`(λ #,wrapper-proc-arglist
|
||||||
(λ (val neg-party)
|
(λ (val neg-party)
|
||||||
(define blame+neg-party (cons blame neg-party))
|
(define blame+neg-party (cons blame neg-party))
|
||||||
(chk val #,method?)
|
(chk val #,method? neg-party)
|
||||||
(c-or-i-procedure
|
(c-or-i-procedure
|
||||||
val
|
val
|
||||||
(let ([arg-checker
|
(let ([arg-checker
|
||||||
|
|
Loading…
Reference in New Issue
Block a user