We should infer on the dotted var also, for the case where the underlying
function's type and/or the arguments to said function use it.
This commit is contained in:
parent
a6ea8d7954
commit
6a8b7e2e14
|
@ -425,7 +425,9 @@
|
|||
;; polymorphic varargs
|
||||
[(tc-result: (and t
|
||||
(or (Poly: vars (Function: (list (arr: dom rng rest #f thn-eff els-eff))))
|
||||
(PolyDots: (list vars ... _) (Function: (list (arr: dom rng rest #f thn-eff els-eff)))))))
|
||||
;; we want to infer the dotted-var here as well, and we don't use these separately
|
||||
;; so we can just use "vars" instead of (list fixed-vars ... dotted-var)
|
||||
(PolyDots: vars (Function: (list (arr: dom rng rest #f thn-eff els-eff)))))))
|
||||
(for-each (lambda (x) (unless (not (Poly? x))
|
||||
(tc-error "Polymorphic argument ~a to polymorphic function not allowed" x)))
|
||||
argtypes)
|
||||
|
|
Loading…
Reference in New Issue
Block a user