From 6a8b7e2e14b004edfe82efe998b4503ba4e6649f Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Fri, 20 Jun 2008 17:49:43 -0400 Subject: [PATCH] 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. --- collects/typed-scheme/private/tc-app-unit.ss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/private/tc-app-unit.ss b/collects/typed-scheme/private/tc-app-unit.ss index 9d24547a32..43dcbd58c1 100644 --- a/collects/typed-scheme/private/tc-app-unit.ss +++ b/collects/typed-scheme/private/tc-app-unit.ss @@ -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)