Allow requiring functions with filters in contravariant positions.

This commit is contained in:
Eric Dobson 2013-04-06 12:43:16 -07:00
parent 03e1ffda3e
commit dbcb1414da
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#lang racket/load
(module untyped racket
(provide f)
(define (f g) 'g))
(module typed typed/racket
(require/typed 'untyped
[f ((Any -> Boolean : Symbol) -> Symbol)]))
(require 'typed)

View File

@ -205,7 +205,7 @@
(and rst (t->c/neg rst))))]
;; functions with filters or objects
[(arr: dom (Values: (list (Result: rngs _ _) ...)) rst #f '())
(if (and from-typed? pos?)
(if from-typed?
(values (map t->c/neg dom)
null
(map t->c rngs)