typed-racket/typed-racket-test/fail/same-name-struct-type.rkt
Asumu Takikawa 52cc284d87 Better error msg for structs with the same name
Thanks to Max for the suggestion
2015-02-13 00:10:19 -05:00

21 lines
434 B
Racket

#;
(exn-pred #rx"incompatible struct types with the same name")
#lang racket/load
;; Test the error message for subtyping errors on struct types
;; with the same name
(module a typed/racket
(struct foo ([x : Integer]))
(define a-foo (foo 3))
(provide a-foo))
(module b typed/racket
(struct foo ([x : String]))
(define (f [a-foo : foo]) (foo-x a-foo))
(provide f))
(module c typed/racket
(require 'a 'b)
(f a-foo))