Calls to vector now return heterogenous vectors, to preserve length
information. original commit: f79f617ee80417059c15d9228489ec1cb716448a
This commit is contained in:
parent
e431a658e6
commit
39d245984a
|
@ -623,11 +623,8 @@
|
|||
expected))]
|
||||
;; since vectors are mutable, if there is no expected type, we want to generalize the element type
|
||||
[(or #f (tc-result1: _))
|
||||
(let ([arg-tys (map (lambda (x)
|
||||
(match (single-value x)
|
||||
[(tc-result1: t) (ret (generalize t))]))
|
||||
(syntax->list #'(args ...)))])
|
||||
(tc/funapp #'op #'(args ...) (single-value #'op) arg-tys expected))]
|
||||
(ret (make-HeterogenousVector (map (lambda (x) (generalize (tc-expr/t x)))
|
||||
(syntax->list #'(args ...)))))]
|
||||
[_ (int-err "bad expected: ~a" expected)]))]
|
||||
;; since vectors are mutable, if there is no expected type, we want to generalize the element type
|
||||
[(#%plain-app (~and op (~literal make-vector)) n elt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user