typed-racket
typed-racket copied to clipboard
Inconsistent behavior of type `Any` for unannotated programs
#lang typed/racket
(define (g x) x)
(define x : Number (g 42))
(define y : String (g "hello"))
TR does not reject the program, even though g has type Any -> Any in this case. If we annotate g with Any -> Any, the program gets rejected as expected.