File tree 2 files changed +5
-3
lines changed
typed-racket-lib/typed-racket/infer
typed-racket-test/tests/typed-racket/unit-tests
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 582
582
;; ListDots can be below a Listof
583
583
;; must be above mu unfolding
584
584
[((ListDots: s-dty dbound) (Listof: t-elem))
585
- #:return-when (memq dbound Y) #f
586
- (cgen V X Y (substitute Univ dbound s-dty) t-elem)]
585
+ (if (memq dbound Y)
586
+ (% move-rest-to-dmap (cgen V (cons dbound X) Y s-dty t-elem) dbound)
587
+ (cgen V X Y (substitute Univ dbound s-dty) t-elem))]
587
588
;; two ListDots with the same bound, just check the element type
588
589
;; This is conservative because we don't try to infer a constraint on dbound.
589
590
[((ListDots: s-dty dbound) (ListDots: t-dty dbound))
Original file line number Diff line number Diff line change 100
100
(infer-t (-v a) (-v b) #:vars '(b))
101
101
102
102
(infer-t (make-ListDots -Symbol 'b ) (-lst -Symbol) #:indices '(b))
103
+ (infer-t (make-ListDots (-v a) 'b ) (-lst -Symbol) #:vars '(a) #:indices '(b))
104
+ (infer-t (make-ListDots (-v b) 'b ) (-lst -Symbol) #:indices '(b))
103
105
(infer-t (make-ListDots (-v b) 'b ) (-lst Univ) #:indices '(b))
104
106
(infer-t (make-ListDots (-v a) 'b ) (make-ListDots -Symbol 'b ) #:vars '(a))
105
107
(infer-t (make-ListDots -Symbol 'b ) (make-ListDots Univ 'b ) #:indices '(b))
128
130
[infer-t (-lst* -String) (make-ListDots -Symbol 'b ) #:indices '(b) #:fail ]
129
131
130
132
;; Currently Broken
131
- ;(infer-t (make-ListDots (-v b) 'b) (-lst -Symbol) #:indices '(b))
132
133
;(infer-t (-lst -Symbol) (make-ListDots -Symbol 'b) #:indices '(b))
133
134
;(infer-t (make-ListDots (-v b) 'b) (make-ListDots -Symbol 'b) #:indices '(b))
134
135
;(infer-t (make-ListDots -Symbol 'b) (make-ListDots (-v b) 'b) #:indices '(b))
You can’t perform that action at this time.
0 commit comments