Generalize hash table literals and subtypes of symbol.

Closes PR 11670.

original commit: 2bd0145603f411e01ce6e16bfcf6ffc842b6801a
This commit is contained in:
Vincent St-Amour 2011-01-26 11:37:56 -05:00
parent f71157285c
commit b13ebb0924
2 changed files with 3 additions and 2 deletions

View File

@ -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)])
))

View File

@ -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]))