diff --git a/collects/tests/racket/benchmarks/shootout/typed/chameneos.rktl b/collects/tests/racket/benchmarks/shootout/typed/chameneos.rktl index b493c09b8a..baa26a577d 100644 --- a/collects/tests/racket/benchmarks/shootout/typed/chameneos.rktl +++ b/collects/tests/racket/benchmarks/shootout/typed/chameneos.rktl @@ -88,7 +88,7 @@ [meeting-ch : MeetingChannel (make-channel)]) (place meeting-ch n) (newline) - (for ([init inits]) + (for: ([init : Color inits]) (printf " ~a" init) (creature init meeting-ch result-ch)) (newline) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index 7f2efe5446..141d8dce2e 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -872,7 +872,8 @@ (tc-l #"foo" -Bytes) [tc-l () (-val null)] [tc-l (3 . 4) (-pair -PositiveFixnum -PositiveFixnum)] - [tc-l #hash((1 . 2) (3 . 4)) (make-Hashtable -PositiveFixnum -PositiveFixnum)]) + [tc-l #hash((1 . 2) (3 . 4)) (make-Hashtable -Integer -Integer)] + [tc-l #hasheq((a . q) (b . w)) (make-Hashtable -Symbol -Symbol)]) )) diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index 1ede210e8b..2a25971d63 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -96,7 +96,7 @@ (let* ([h (syntax-e #'i)] [ks (hash-map h (lambda (x y) (tc-literal x)))] [vs (hash-map h (lambda (x y) (tc-literal y)))]) - (make-Hashtable (apply Un ks) (apply Un vs)))] + (make-Hashtable (generalize (apply Un ks)) (generalize (apply Un vs))))] [(a . b) (-pair (tc-literal #'a) (tc-literal #'b))] [_ Univ])) diff --git a/collects/typed-scheme/types/convenience.rkt b/collects/typed-scheme/types/convenience.rkt index 72e83d4ec7..9fb4117f20 100644 --- a/collects/typed-scheme/types/convenience.rkt +++ b/collects/typed-scheme/types/convenience.rkt @@ -47,6 +47,7 @@ t-new (exit t)))] [(ListDots: t bound) (-lst (substitute Univ bound t))] + [(? (lambda (t) (subtype t -Symbol))) -Symbol] [_ (exit t)]))))