add obligations for instanceof/c
This commit is contained in:
parent
77d0b0b8f4
commit
b8c398cc69
|
@ -3,7 +3,7 @@
|
||||||
racket/list)
|
racket/list)
|
||||||
|
|
||||||
(parameterize ([current-contract-namespace
|
(parameterize ([current-contract-namespace
|
||||||
(make-basic-contract-namespace)])
|
(make-basic-contract-namespace 'racket/class)])
|
||||||
(define (test-obligations quoted-expr expected-props)
|
(define (test-obligations quoted-expr expected-props)
|
||||||
|
|
||||||
(define ((cleanup key stx) obj)
|
(define ((cleanup key stx) obj)
|
||||||
|
@ -69,6 +69,9 @@
|
||||||
(test-obligations '(listof a)
|
(test-obligations '(listof a)
|
||||||
'((racket/contract:contract (listof) ())
|
'((racket/contract:contract (listof) ())
|
||||||
(racket/contract:positive-position a)))
|
(racket/contract:positive-position a)))
|
||||||
|
(test-obligations '(instanceof/c a)
|
||||||
|
'((racket/contract:contract (instanceof/c) ())
|
||||||
|
(racket/contract:positive-position a)))
|
||||||
(test-obligations '(hash/c a b)
|
(test-obligations '(hash/c a b)
|
||||||
'((racket/contract:contract (hash/c) ())
|
'((racket/contract:contract (hash/c) ())
|
||||||
(racket/contract:negative-position a)
|
(racket/contract:negative-position a)
|
||||||
|
|
|
@ -1423,7 +1423,7 @@
|
||||||
#:first-order instanceof/c-first-order
|
#:first-order instanceof/c-first-order
|
||||||
#:stronger instanceof/c-stronger))
|
#:stronger instanceof/c-stronger))
|
||||||
|
|
||||||
(define (instanceof/c cctc)
|
(define/subexpression-pos-prop (instanceof/c cctc)
|
||||||
(let ([ctc (coerce-contract 'instanceof/c cctc)])
|
(let ([ctc (coerce-contract 'instanceof/c cctc)])
|
||||||
(make-base-instanceof/c ctc)))
|
(make-base-instanceof/c ctc)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user