typed-racket
typed-racket copied to clipboard
Bindings re-exported in submodules are not protected by contracts
What version of Racket are you using?
8.0.0.12--2021-03-21(8bf8e3c/a) [cs]
What program did you run?
#lang racket
(module a typed/racket/base
(define (f [a : Integer]) (add1 a))
(module+ b
(provide f)))
(require (submod 'a b))
(f #f)
What should have happened?
It should fail without calling add1.
If you got an error message, please include it here.
add1: contract violation
expected: number?
given: #f
This is probably failing to figure out that f is defined "locally" and thus needs a contract.