Properly compute Dotted variance for ListDots and ValuesDots.
original commit: 0fb1ac66bd03748767a30c41ec69207b9349e1bf
This commit is contained in:
parent
33bbcb17bc
commit
72f1d63d90
|
@ -68,7 +68,12 @@
|
|||
|
||||
;; dotted list -- after expansion, becomes normal Pair-based list type
|
||||
(dt ListDots ([dty Type/c] [dbound (or/c symbol? natural-number/c)])
|
||||
[#:frees (λ (f) (f dty))]
|
||||
[#:frees (if (symbol? dbound)
|
||||
(fix-bound (free-vars* dty) dbound)
|
||||
(free-vars* dty))
|
||||
(if (number? dbound)
|
||||
(fix-bound (free-idxs* dty) dbound)
|
||||
(free-idxs* dty))]
|
||||
[#:fold-rhs (*ListDots (type-rec-id dty) dbound)])
|
||||
|
||||
;; *mutable* pairs - distinct from regular pairs
|
||||
|
@ -157,7 +162,12 @@
|
|||
[#:fold-rhs (*Values (map type-rec-id rs))])
|
||||
|
||||
(dt ValuesDots ([rs (listof Result?)] [dty Type/c] [dbound (or/c symbol? natural-number/c)])
|
||||
[#:frees (λ (f) (combine-frees (map f (cons dty rs))))]
|
||||
[#:frees (if (symbol? dbound)
|
||||
(fix-bound (combine-frees (map free-vars* (cons dty rs))) dbound)
|
||||
(combine-frees (map free-vars* (cons dty rs))))
|
||||
(if (number? dbound)
|
||||
(fix-bound (combine-frees (map free-idxs* (cons dty rs))) dbound)
|
||||
(combine-frees (map free-idxs* (cons dty rs))))]
|
||||
[#:fold-rhs (*ValuesDots (map type-rec-id rs) (type-rec-id dty) dbound)])
|
||||
|
||||
;; arr is NOT a Type
|
||||
|
|
Loading…
Reference in New Issue
Block a user