Add #f as a special case for hash-ref, fix hash-ref!.
Closes PR 14158. Merge to 6.0. original commit: 258d9b8e2f53936ff166c069ca0ab267ed77f602
This commit is contained in:
parent
459a59a954
commit
2791f89cd2
|
@ -713,12 +713,12 @@
|
|||
[hash-set! (-poly (a b) ((-HT a b) a b . -> . -Void))]
|
||||
[hash-ref (-poly (a b c)
|
||||
(cl-> [((-HT a b) a) b]
|
||||
[((-HT a b) a (-val #f)) (-opt b)]
|
||||
[((-HT a b) a (-> c)) (Un b c)]
|
||||
[(-HashTop a) Univ]
|
||||
[(-HashTop a (-val #f)) Univ]
|
||||
[(-HashTop a (-> c)) Univ]))]
|
||||
[hash-ref! (-poly (a b)
|
||||
(cl-> [((-HT a b) a b) b]
|
||||
[((-HT a b) a (-> b)) b]))]
|
||||
[hash-ref! (-poly (a b) (-> (-HT a b) a (-> b) b))]
|
||||
[hash-has-key? (-HashTop Univ . -> . B)]
|
||||
[hash-update! (-poly (a b)
|
||||
(cl-> [((-HT a b) a (-> b b)) -Void]
|
||||
|
|
|
@ -1845,6 +1845,12 @@
|
|||
(define x 3)
|
||||
(if ((negate pos?) x) x -5))
|
||||
#:ret (ret -NonPosReal (-FS -top -bot))]
|
||||
|
||||
[tc-err
|
||||
(hash-ref! (ann (make-hash) (HashTable #f (-> #t))) #f (lambda () #t))]
|
||||
[tc-e
|
||||
(hash-ref (ann (make-hash) (HashTable #f #t)) #f #f)
|
||||
-Boolean]
|
||||
)
|
||||
(test-suite
|
||||
"tc-literal tests"
|
||||
|
|
Loading…
Reference in New Issue
Block a user