typed-racket icon indicating copy to clipboard operation
typed-racket copied to clipboard

Inconsistent behavior of type `Any` for unannotated programs

Open capfredf opened this issue 7 months ago • 0 comments

#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.

capfredf avatar Mar 03 '25 17:03 capfredf