Make vector-immutable work like vector. Closes PR 11535.

original commit: a14723f27a61ce262b0024db1777fa2db7f94c8b
This commit is contained in:
Eric Dobson 2011-06-24 20:35:06 -04:00 committed by Vincent St-Amour
parent 1303c1ff46
commit 56e83287e8
2 changed files with 3 additions and 1 deletions

View File

@ -190,6 +190,8 @@
[tc-e/t '(2 3 4) (-lst* -PosByte -PosByte -PosByte)]
[tc-e/t '(2 3 #t) (-lst* -PosByte -PosByte (-val #t))]
[tc-e/t #(2 3 #t) (make-HeterogenousVector (list -Integer -Integer (-val #t)))]
[tc-e (vector 2 "3" #t) (make-HeterogenousVector (list -Integer -String (-val #t)))]
[tc-e (vector-immutable 2 "3" #t) (make-HeterogenousVector (list -Integer -String (-val #t)))]
[tc-e/t '(#t #f) (-lst* (-val #t) (-val #f))]
[tc-e/t (plambda: (a) ([l : (Listof a)]) (car l))
(make-Poly '(a) (t:-> (make-Listof (-v a)) (-v a)))]

View File

@ -419,7 +419,7 @@
[v-ty
(let ([arg-tys (list v-ty e-t (single-value #'val))])
(tc/funapp #'op #'(v e val) (single-value #'op) arg-tys expected))])))]
[(#%plain-app (~and op (~literal vector)) args:expr ...)
[(#%plain-app (~and op (~or (~literal vector-immutable) (~literal vector))) args:expr ...)
(let loop ([expected expected])
(match expected
[(tc-result1: (Vector: t))