typed-racket/typed-racket-test/xfail/xmodule-mutation.rkt
2014-12-16 10:07:25 -05:00

20 lines
313 B
Racket

#lang racket/load
(module m typed/racket
(: x Any)
(define x "foo")
(: f (-> Void))
(define (f) (set! x 1))
(provide f x))
(module n typed/racket
(require 'm)
(if (string? x)
(begin
(f)
;; this should be a type error!
(string-append x "foo"))
0))
(require 'n)