overlap tests for Seq and Evt, minor overlap fix
This commit is contained in:
parent
16db5ecc78
commit
3ed6b464e7
|
@ -34,8 +34,7 @@
|
|||
(match (list t1 t2)
|
||||
[(list-no-order (Univ:) _) #t]
|
||||
[(list-no-order (F: _) _) #t]
|
||||
[(list (Opaque: _) _) #t]
|
||||
[(list-no-order _ (Opaque: _)) #t]
|
||||
[(list-no-order (Opaque: _) _) #t]
|
||||
[(list (Name/simple: n) (Name/simple: n*))
|
||||
(or (free-identifier=? n n*)
|
||||
(overlap (resolve-once t1) (resolve-once t2)))]
|
||||
|
|
|
@ -1996,6 +1996,23 @@
|
|||
(-seq (-val 0))]
|
||||
[tc-e (sequence-add-between (inst empty-sequence Integer) 'foo)
|
||||
(-seq (t:Un -Int (-val 'foo)))]
|
||||
[tc-e (let ()
|
||||
(: foo ((Sequenceof Integer) -> (Sequenceof Any)))
|
||||
(define foo
|
||||
(λ (x)
|
||||
(cond
|
||||
[(boolean? x) (void)]
|
||||
[(symbol? x) (void)]
|
||||
[(char? x) (void)]
|
||||
[(void? x) (void)]
|
||||
[(string? x) x]
|
||||
[(integer? x) x]
|
||||
[(list? x) x]
|
||||
[(input-port? x) x]
|
||||
[(set? x) x]
|
||||
[else 42])))
|
||||
(void))
|
||||
-Void]
|
||||
[tc-e (let ()
|
||||
(define: x : Any (vector 1 2 3))
|
||||
(if (vector? x) (vector-ref x 0) #f))
|
||||
|
@ -2321,6 +2338,19 @@
|
|||
(place-channel-put c1 "a"))
|
||||
-Void]
|
||||
[tc-e (place-message-allowed? 'msg) -Boolean]
|
||||
|
||||
[tc-e (let ()
|
||||
(: bar ((Evtof Any) -> (Evtof Any)))
|
||||
(define bar
|
||||
(λ (x)
|
||||
(cond
|
||||
[(boolean? x) "nope"]
|
||||
[(symbol? x) "nope"]
|
||||
[(char? x) "nope"]
|
||||
[(void? x) "nope"]
|
||||
[(evt? x) x])))
|
||||
(void))
|
||||
-Void]
|
||||
|
||||
;; fxvectors & flvectors
|
||||
[tc-e (let ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user