
The contract for `(U (I-Hash k1 v1) (M-Hash k2 v2) (W-Hash k3 v3))` is now `(hash/c (or/c k1 k2 k3) (or/c v1 v2 v3))` ONLY WHEN the key and value types are distinct. The contract should no longer include duplicate key or value types.
10 lines
186 B
Racket
10 lines
186 B
Racket
#lang racket/base
|
|
|
|
(module t typed/racket
|
|
(provide h)
|
|
(define h : (U (Immutable-HashTable Symbol Any) (Mutable-HashTable Symbol Any))
|
|
(hash 'a 1)))
|
|
|
|
(require 't)
|
|
(hash-ref h 'a)
|