From a24c4717a9d6e6615164fb3f0a8ccd71f94bd063 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Tue, 13 May 2014 09:22:46 -0700 Subject: [PATCH] Fix return tc-results when typechecking kw lambda. original commit: 46701b6983c0c3269f6f7fbfa949ab9479b57cf8 --- .../typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt | 2 +- .../tests/typed-racket/unit-tests/typecheck-tests.rkt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index 97cbf3f9..828d2b17 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -189,7 +189,7 @@ [(tc-result1: (and f (or (Function: _) (Poly: _ (Function: _))))) (tc-expr/check/type #'fun (kw-convert f #:split #t)) - expected] + (ret f -true-filter)] [(or (tc-results: _) (tc-any-results:)) (tc-expr form)])] ;; opt function def diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt index f412c87a..9ccff2fc 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -2949,6 +2949,10 @@ #:ret (ret (-polydots (A B ...) (->... (list A) (B B) (-values-dots (list A) B 'B)))) #:expected (ret (-polydots (A B ...) (->... (list A) (B B) (-values-dots (list A) B 'B)))) ] + [tc-e + (tr:lambda (x #:y [y 3]) x) + #:ret (ret (->key Univ #:y Univ #f Univ) -true-filter) + #:expected (ret (->key Univ #:y Univ #f Univ) -no-filter)] )