Require Procedure contract to be a chaperone

Closes PR 13746

original commit: 7ea19bf95127adfde0db9d70b9be8d633886b870
This commit is contained in:
Asumu Takikawa 2013-08-21 13:44:25 -04:00
parent 9f922ed7e5
commit bd7fc20134
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -0,0 +1,6 @@
#;
(exn:pred #rx"Procedure could not be converted to a predicate")
#lang typed/racket
(define-predicate A? Procedure)