diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index e03ec46d..75f94b57 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -640,6 +640,9 @@ (apply (plambda: (b ...) ([x : Number] . [y : Number ... b]) x) 1 w)) (-polydots (a) ((list -String) (N a) . ->... . N))] + [tc-e/t (let ([f (plambda: (a ...) [w : a ... a] w)]) + (f 1 "hello" #\c)) + (-pair -PositiveFixnum (-pair -String (-pair -Char (-val null))))] ;; instantiating non-dotted terms [tc-e/t (inst (plambda: (a) ([x : a]) x) Integer) (make-Function (list (make-arr* (list -Integer) -Integer diff --git a/collects/typed-scheme/types/substitute.rkt b/collects/typed-scheme/types/substitute.rkt index a2957404..f148e8bc 100644 --- a/collects/typed-scheme/types/substitute.rkt +++ b/collects/typed-scheme/types/substitute.rkt @@ -71,7 +71,7 @@ ;; We need to recur first, just to expand out any dotted usages of this. (let ([expanded (sb dty)]) (for/fold ([t (make-Value null)]) - ([img images]) + ([img (reverse images)]) (make-Pair (substitute img name expanded) t))) (make-ListDots (sb dty) dbound))] [#:ValuesDots types dty dbound