TR: Fix type-checking of hash literals.
original commit: abf9223203d373840adb4bba0495dac7aa422517
This commit is contained in:
parent
8fdb647233
commit
ece68f93e3
4
collects/tests/typed-racket/succeed/hash-literal.rkt
Normal file
4
collects/tests/typed-racket/succeed/hash-literal.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang typed/racket
|
||||
|
||||
(define: x : (HashTable String String) #hash())
|
||||
(ann #hash() (HashTable String String))
|
|
@ -111,7 +111,7 @@
|
|||
(let* ([h (syntax-e #'i)]
|
||||
[ks (hash-map h (lambda (x y) (tc-literal x k)))]
|
||||
[vs (hash-map h (lambda (x y) (tc-literal y v)))])
|
||||
(make-Hashtable (generalize (check-below (apply Un ks)) k) (generalize (check-below (apply Un vs)))))]
|
||||
(make-Hashtable (generalize (check-below (apply Un ks) k)) (generalize (check-below (apply Un vs) v))))]
|
||||
[_ (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)))])
|
||||
|
|
Loading…
Reference in New Issue
Block a user