Make inference understand the relationship between Vector' and Vectorof'.

Closes PR 12495.

original commit: 4d21ab10194df181e697810bdbf303f2de4e8ca7
This commit is contained in:
Sam Tobin-Hochstadt 2012-02-10 17:39:05 -05:00
parent 7e9caf4eaf
commit be4b0a9158
2 changed files with 6 additions and 0 deletions

View File

@ -1395,6 +1395,9 @@
(go first second third fourth fifth sixth seventh eighth ninth tenth))
(-val 1)]
[tc-e (vector-append #(1) #(2))
(-vec -Integer)]
)
(test-suite
"check-type tests"

View File

@ -406,6 +406,9 @@
(cg t t*)))]
[((HeterogenousVector: ts) (HeterogenousVector: ts*))
(cset-meet (cgen/list V X Y ts ts*) (cgen/list V X Y ts* ts))]
[((HeterogenousVector: ts) (Vector: s))
(define ts* (map (λ _ s) ts)) ;; invariant, everything has to match
(cset-meet (cgen/list V X Y ts ts*) (cgen/list V X Y ts* ts))]
[((HeterogenousVector: ts) (Sequence: (list t*)))
(cset-meet* (for/list ([t (in-list ts)])
(cg t t*)))]