Open
Description
This program segfaults:
#lang racket
(module untyped racket
(provide (struct-out foo))
(struct foo (value)))
(module typed typed/racket
(require/typed
(submod ".." untyped)
[#:struct foo ([value : (-> (List Integer) Integer)])])
(provide the-bar)
(struct bar foo ())
(define the-bar (bar (λ (lst) (car lst)))))
(require 'untyped
'typed)
((foo-value the-bar) #f)
The the-bar
export appears to escape with an any/c
contract, since TR believes it has proved the relevant obligations, but as the program demonstrates, that just isn’t true.