Require Procedure contract to be a chaperone
Closes PR 13746 original commit: 7ea19bf95127adfde0db9d70b9be8d633886b870
This commit is contained in:
parent
9f922ed7e5
commit
bd7fc20134
|
@ -148,7 +148,9 @@
|
|||
(loop t 'both structs-seen kind))
|
||||
(define (t->c/fun f #:method [method? #f])
|
||||
(match f
|
||||
[(Function: (list (top-arr:))) #'(case->)]
|
||||
[(Function: (list (top-arr:)))
|
||||
(set-chaperone!)
|
||||
#'(case->)]
|
||||
[(Function: arrs)
|
||||
(set-chaperone!)
|
||||
;; Try to generate a single `->*' contract if possible.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#;
|
||||
(exn:pred #rx"Procedure could not be converted to a predicate")
|
||||
#lang typed/racket
|
||||
|
||||
(define-predicate A? Procedure)
|
||||
|
Loading…
Reference in New Issue
Block a user