From 8d4b3ee396a645a828594b7b9afdcaf7e5676ccd Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Thu, 20 Feb 2014 00:06:45 -0500 Subject: [PATCH] Add test for PR 13937 The actual bug was already fixed by enabling multi-valued sequence syntax in TR `for` loop forms. Closes PR 13937 --- .../tests/typed-racket/unit-tests/typecheck-tests.rkt | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 45bffee882..ea6f1cbccf 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 @@ -2008,6 +2008,17 @@ #:ret (ret (-HT -Symbol -String) (-FS -top -top) (make-NoObject))] + + ;; PR 13937 + [tc-e (let () + (: foo ((HashTable String Symbol) -> (HashTable Symbol String))) + (define (foo map) + (for/hash : (HashTable Symbol String) + ([(str sym) map]) + (values sym str))) + (foo #hash(("foo" . foo)))) + (-HT -Symbol -String)] + ;; call-with-input-string and friends - PR 14050 [tc-e (call-with-input-string "abcd" (lambda: ([input : Input-Port]) (values 'a 'b))) #:ret (ret (list (-val 'a) (-val 'b)))]