Fix type inference helper on AnyValues range

This bug allows a test to be written for the previous
commit. Previously, it would throw a match error.

original commit: b5d4333d2c52d0103eb7d508b41726836d292c24
This commit is contained in:
Asumu Takikawa 2014-01-16 17:34:11 -05:00
parent a5937ba827
commit 09b0ca2ef3
2 changed files with 8 additions and 7 deletions

View File

@ -13,8 +13,11 @@
(for/or ([e (in-list (append* (map fv ts)))])
(memq e V)))
;; get-filters : SomeValues -> FilterSet
;; extract filters out of the range of a function type
(define (get-filters rng)
(match rng
[(AnyValues:) null]
[(Values: (list (Result: _ lf _) ...)) lf]
[(ValuesDots: (list (Result: _ lf _) ...) _ _) lf]))

View File

@ -148,6 +148,7 @@
racket/sequence
racket/set
racket/string
racket/system
racket/tcp
racket/udp
racket/vector
@ -1366,9 +1367,6 @@
-Output-Port
-Input-Port))
(tc-e (subprocess (current-output-port) (current-input-port) (current-error-port) (string->path "/usr/bin/echo") 'exact "arg")
(list
-Subprocess
@ -1386,6 +1384,10 @@
(subprocess? p))
#:ret (ret -Boolean (-FS -top -bot)))
(tc-e (car (process "hello"))
-Input-Port)
(tc-e (car (process* "hello"))
-Input-Port)
#;
(tc-e (let ()
@ -1417,10 +1419,6 @@
proc-id)
-Nat)
;Compilation
(tc-e (compile-syntax #'(+ 1 2)) -Compiled-Expression)
(tc-e (let: ((e : Compiled-Expression (compile #'(+ 1 2))))