test-none-poly.rkt (375B)
1 #lang typed/racket 2 3 (require typed-struct-props 4 typed/rackunit) 5 6 (struct/props (A) foo ([f : A]) #:transparent) 7 8 (test-not-exn "The structure's constructor and type work properly" 9 (λ () (ann (foo "b") (foo String)))) 10 11 (test-equal? "The structure's constructor and accessor work properly" 12 (ann (foo-f (foo "b")) String) 13 "b") 14