From d425ebda53a619ddc231079aa09c886dbdf7bd22 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Wed, 3 Apr 2013 22:04:50 -0700 Subject: [PATCH] Fix tc-apply to correctly generate expected ValueDots filters. Closes PR 13649. original commit: 76de4d3cca494861e42a14cb84f28fa820c9214b --- collects/tests/typed-racket/unit-tests/typecheck-tests.rkt | 4 ++++ collects/typed-racket/typecheck/tc-apply.rkt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt index a2c1ebe6..b36f2957 100644 --- a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -1630,6 +1630,10 @@ [tc-e ((inst filter Any Symbol) symbol? null) (-lst -Symbol)] + [tc-e/t (ann (plambda: (A B ...) ((a : A) b : B ... B) + (apply (inst values A B ... B) a b)) + (All (A B ...) (A B ... -> (values A B ... B)))) + (-polydots (a b) ((list a) (b b) . ->... . (make-ValuesDots (list (-result a)) b 'b)))] ) (test-suite "check-type tests" diff --git a/collects/typed-racket/typecheck/tc-apply.rkt b/collects/typed-racket/typecheck/tc-apply.rkt index 7859aedf..49debd90 100644 --- a/collects/typed-racket/typecheck/tc-apply.rkt +++ b/collects/typed-racket/typecheck/tc-apply.rkt @@ -24,7 +24,8 @@ (define (do-ret t) (match t [(Values: (list (Result: ts _ _) ...)) (ret ts)] - [(ValuesDots: (list (Result: ts _ _) ...) dty dbound) (ret ts (for/list ([t ts]) (-FS null null)) (for/list ([t ts]) (make-Empty)) dty dbound)] + [(ValuesDots: (list (Result: ts _ _) ...) dty dbound) + (ret ts (for/list ([t ts]) (make-NoFilter)) (for/list ([t ts]) (make-Empty)) dty dbound)] [_ (int-err "do-ret fails: ~a" t)])) (define (tc/apply f args)