typed-racket/typed-racket-test/fail/signature-escape.rkt
Daniel Feltey 2e0cc095c7 Initial support for typed units in typed racket.
Most unit forms are supported, including most of the "infer" forms that
infer imports/exports/linkages from the current context.

Notably, none of the structural linking forms for units are supported, and
`define-unit-binding` is also currently unsupported.
2015-09-10 16:32:11 -05:00

19 lines
633 B
Racket

#;
(exn-pred (regexp-quote "type mismatch\n expected: (Unit (import bad^) (export) (init-depend bad^) AnyValues)\n given: (Unit (import bad^) (export) (init-depend) Void)\n in: (invoke-unit bad (import bad^))"))
#lang typed/racket
;; The full error message for this prorgam is
;; Type Checker: type mismatch
;; expected: (Unit (import bad^) (export) (init-depend bad^) AnyValues)
;; given: (Unit (import bad^) (export) (init-depend) Void)
;; in: (invoke-unit bad (import bad^))
(define-signature bad^ ())
(define bad
(let ()
(define-signature bad^ ())
(unit (import bad^) (export))))
(invoke-unit bad (import bad^))