From 55f68caac5e2e243b3b1a84751cad3125b9e8c8e Mon Sep 17 00:00:00 2001 From: "J. Ian Johnson" Date: Fri, 20 Jun 2014 13:09:13 -0400 Subject: [PATCH] Closes PR14589. original commit: bacbafad9fa223c0ae4ae1bdc8a748b4f54369ce --- .../typed-racket-lib/typed-racket/base-env/for-clauses.rkt | 2 +- .../typed-racket-test/tests/typed-racket/succeed/for-hash.rkt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/for-clauses.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/for-clauses.rkt index 497a65bc..2f8717fe 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/for-clauses.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/for-clauses.rkt @@ -20,7 +20,7 @@ ((v.ann-name ...) seq-expr))) #:with (expand* ...) (list (quasisyntax/loc #'c ((v.ann-name ...) seq-expr)) - #'#:when #'#t)) + #'#:when #''#t)) ;; Note: #:break and #:final clauses don't ever typecheck (pattern (~seq (~and kw (~or #:when #:unless #:break #:final)) guard:expr) #:with (expand ...) (list #'kw #'guard) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/for-hash.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/for-hash.rkt index b2c96973..6e15d463 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/for-hash.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/for-hash.rkt @@ -76,3 +76,7 @@ (for/hash: : (HashTable Symbol Symbol) ((v : Symbol '(a b c))) (values v v)) + +(for/hash: : (HashTable Symbol Symbol) + ([(k b) (in-hash (make-immutable-hash '((a . a) (b . b))))]) + (values k b))