add obligations for instanceof/c

This commit is contained in:
Robby Findler 2018-04-24 14:34:56 -05:00
parent 77d0b0b8f4
commit b8c398cc69
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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)))