new bug with mutation

original commit: b649575afc2611ca0a3bec1f6f3d70e45ec011c1
This commit is contained in:
Sam Tobin-Hochstadt 2010-06-11 11:53:55 -04:00
parent d1bbefe5bf
commit 946a8dd48f

View File

@ -0,0 +1,19 @@
#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)