Fix type of split-at and vector-split-at.

Closes PR12700.

original commit: f428191e1c2b7b36054a1d00d93d6b65994a414a
This commit is contained in:
Eric Dobson 2013-01-31 21:33:57 -08:00
parent 885c3b8a79
commit 4184f9b493
3 changed files with 10 additions and 4 deletions

View File

@ -1596,6 +1596,12 @@
(let ((s (ann (set 2) Any)))
(if (set? s) (ann s (Setof String)) ((inst set String))))]
[tc-e (split-at (list 0 2 3 4 5 6) 3)
(list (-lst -Byte) (-lst -Byte))]
[tc-e (vector-split-at (vector 2 3 4 5 6) 3)
(list (-vec -Integer) (-vec -Integer))]
)
(test-suite
"check-type tests"

View File

@ -243,9 +243,9 @@
[take-right (-poly (a) ((-lst a) index-type . -> . (-lst a)))]
[drop-right (-poly (a) ((-lst a) index-type . -> . (-lst a)))]
[split-at
(-poly (a) ((list (-lst a)) index-type . ->* . (-values (list (-lst a) (-lst a)))))]
(-poly (a) ((-lst a) index-type . -> . (-values (list (-lst a) (-lst a)))))]
[split-at-right
(-poly (a) ((list (-lst a)) index-type . ->* . (-values (list (-lst a) (-lst a)))))]
(-poly (a) ((-lst a) index-type . -> . (-values (list (-lst a) (-lst a)))))]
[vector-ref (-poly (a) (cl->* ((-vec a) index-type . -> . a)
(-VectorTop index-type . -> . Univ)))]

View File

@ -1587,9 +1587,9 @@
[vector-take-right (-poly (a) ((-vec a) -Integer . -> . (-vec a)))]
[vector-drop-right (-poly (a) ((-vec a) -Integer . -> . (-vec a)))]
[vector-split-at
(-poly (a) ((list (-vec a)) -Integer . ->* . (-values (list (-vec a) (-vec a)))))]
(-poly (a) ((-vec a) -Integer . -> . (-values (list (-vec a) (-vec a)))))]
[vector-split-at-right
(-poly (a) ((list (-vec a)) -Integer . ->* . (-values (list (-vec a) (-vec a)))))]
(-poly (a) ((-vec a) -Integer . -> . (-values (list (-vec a) (-vec a)))))]
;vector->values