Allow requiring functions with filters in contravariant positions.
This commit is contained in:
parent
03e1ffda3e
commit
dbcb1414da
|
@ -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)
|
|
@ -205,7 +205,7 @@
|
||||||
(and rst (t->c/neg rst))))]
|
(and rst (t->c/neg rst))))]
|
||||||
;; functions with filters or objects
|
;; functions with filters or objects
|
||||||
[(arr: dom (Values: (list (Result: rngs _ _) ...)) rst #f '())
|
[(arr: dom (Values: (list (Result: rngs _ _) ...)) rst #f '())
|
||||||
(if (and from-typed? pos?)
|
(if from-typed?
|
||||||
(values (map t->c/neg dom)
|
(values (map t->c/neg dom)
|
||||||
null
|
null
|
||||||
(map t->c rngs)
|
(map t->c rngs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user