diff --git a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt index bd35e73fb9..28d6e8d8b3 100644 --- a/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -877,7 +877,9 @@ (t:Un (-val #f) -Number)] [tc-e #{(make-hash) :: (HashTable Number Number)} - (make-Hashtable -Number -Number)] + (-HT -Number -Number)] + [tc-e #{(make-immutable-hash) :: (HashTable String Symbol)} + (-HT -String -Symbol)] #;[tc-err (let: ([fact : (Number -> Number) (lambda: ([n : Number]) (if (zero? n) 1 (* n (fact (- n 1)))))]) (fact 20))] diff --git a/collects/typed-racket/base-env/base-env.rkt b/collects/typed-racket/base-env/base-env.rkt index 2cafdf5526..16d68cb81c 100644 --- a/collects/typed-racket/base-env/base-env.rkt +++ b/collects/typed-racket/base-env/base-env.rkt @@ -895,9 +895,9 @@ [make-weak-hash (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] [make-weak-hasheq (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] [make-weak-hasheqv (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] -[make-immutable-hash (-poly (a b) (-> (-lst (-pair a b)) (-HT a b)))] -[make-immutable-hasheq (-poly (a b) (-> (-lst (-pair a b)) (-HT a b)))] -[make-immutable-hasheqv (-poly (a b) (-> (-lst (-pair a b)) (-HT a b)))] +[make-immutable-hash (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] +[make-immutable-hasheq (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] +[make-immutable-hasheqv (-poly (a b) (->opt [(-lst (-pair a b))] (-HT a b)))] [hash-set (-poly (a b) ((-HT a b) a b . -> . (-HT a b)))] [hash-set! (-poly (a b) ((-HT a b) a b . -> . -Void))]