File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
typed-racket-lib/typed-racket/infer
typed-racket-test/tests/typed-racket/unit-tests Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 585
585
(if (memq dbound Y)
586
586
(% move-rest-to-dmap (cgen V (cons dbound X) Y s-dty t-elem) dbound)
587
587
(cgen V X Y (substitute Univ dbound s-dty) t-elem))]
588
+ [((Listof: s-elem) (ListDots: t-dty dbound))
589
+ #:return-unless (memq dbound Y) #f
590
+ (define v (cgen V (cons dbound X) Y s-elem t-dty))
591
+ (and v (move-rest-to-dmap v dbound #:exact #t ))]
592
+
588
593
;; two ListDots with the same bound, just check the element type
589
594
;; This is conservative because we don't try to infer a constraint on dbound.
590
595
[((ListDots: s-dty dbound) (ListDots: t-dty dbound))
Original file line number Diff line number Diff line change 102
102
(infer-t (make-ListDots -Symbol 'b ) (-lst -Symbol) #:indices '(b))
103
103
(infer-t (make-ListDots (-v a) 'b ) (-lst -Symbol) #:vars '(a) #:indices '(b))
104
104
(infer-t (make-ListDots (-v b) 'b ) (-lst -Symbol) #:indices '(b))
105
+ (infer-t (-lst -Symbol) (make-ListDots -Symbol 'b ) #:indices '(b))
105
106
(infer-t (make-ListDots (-v b) 'b ) (-lst Univ) #:indices '(b))
106
107
(infer-t (make-ListDots (-v a) 'b ) (make-ListDots -Symbol 'b ) #:vars '(a))
107
108
(infer-t (make-ListDots -Symbol 'b ) (make-ListDots Univ 'b ) #:indices '(b))
130
131
[infer-t (-lst* -String) (make-ListDots -Symbol 'b ) #:indices '(b) #:fail ]
131
132
132
133
;; Currently Broken
133
- ;(infer-t (-lst -Symbol) (make-ListDots -Symbol 'b) #:indices '(b))
134
134
;(infer-t (make-ListDots (-v b) 'b) (make-ListDots -Symbol 'b) #:indices '(b))
135
135
;(infer-t (make-ListDots -Symbol 'b) (make-ListDots (-v b) 'b) #:indices '(b))
136
136
;(infer-t (make-ListDots -Symbol 'b) (-pair -Symbol (-lst -Symbol)) #:indices '(b))
You can’t perform that action at this time.
0 commit comments