typed-racket/typed-racket-test/succeed/hashtabletop-flat-contract.rkt
Ben Greenman afa0530b3a backwards-compatibility: make HashTableTop generate a flat contract
Changing `HashTableTop` from a singleton to the union:

```
  (U (Immutable-HashTable Any Any) MutableHashTable WeakHashTable)
```

is a backwards compatibility issue because the type `Any` requires a chaperone,
therefore `HashTableTop` requires a chaperone.

This commit adds a case to make sure `HashTableTop` generates a flat contract.
2017-07-13 15:13:59 -04:00

7 lines
142 B
Racket

#lang typed/racket/base
;; Test that `HashTableTop` generates a flat contract
(define h : HashTableTop (hash))
(void (cast h HashTableTop))