another fix to the first-order check I added earlier today
(discovered by the test suites run by drdr)
This commit is contained in:
parent
b44c23ba20
commit
074f21203a
|
@ -2817,13 +2817,14 @@ An example
|
||||||
[c (in-list (class/c-method-contracts ctc))])
|
[c (in-list (class/c-method-contracts ctc))])
|
||||||
(define mth (hash-ref method-ht m #f))
|
(define mth (hash-ref method-ht m #f))
|
||||||
(unless mth (fail "no public method ~a" m))
|
(unless mth (fail "no public method ~a" m))
|
||||||
(define meth-proc
|
(when c
|
||||||
(let loop ([m/l (vector-ref methods mth)])
|
(define meth-proc
|
||||||
(cond
|
(let loop ([m/l (vector-ref methods mth)])
|
||||||
[(pair? m/l) (loop (car m/l))]
|
(cond
|
||||||
[else m/l])))
|
[(pair? m/l) (loop (car m/l))]
|
||||||
(unless (contract-first-order-passes? c meth-proc)
|
[else m/l])))
|
||||||
(fail "public method ~a doesn't match contract" m)))
|
(unless (contract-first-order-passes? c meth-proc)
|
||||||
|
(fail "public method ~a doesn't match contract" m))))
|
||||||
(unless (class/c-opaque? ctc)
|
(unless (class/c-opaque? ctc)
|
||||||
(for ([m (class/c-absents ctc)])
|
(for ([m (class/c-absents ctc)])
|
||||||
(when (hash-ref method-ht m #f)
|
(when (hash-ref method-ht m #f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user