typed-racket/typed-racket-test/fail/pr13209.rkt
2014-12-16 10:07:25 -05:00

15 lines
384 B
Racket
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#;
(exn-pred #rx"arguments for structure type constructor")
#lang typed/racket
;; Test for PR 13209
;;
;; The use of `node` at the end has the wrong number of
;; type arguments. This should not raise an internal error.
(struct: (α) leaf ({value : α}))
(struct: (α) node ({left : [Tree α]} {right : [Tree α]}))
(define-type (Tree α) (mu Tree (U (leaf α) (node Tree Tree))))