new bug with mutation
original commit: b649575afc2611ca0a3bec1f6f3d70e45ec011c1
This commit is contained in:
parent
d1bbefe5bf
commit
946a8dd48f
19
collects/tests/typed-scheme/xfail/xmodule-mutation.rkt
Normal file
19
collects/tests/typed-scheme/xfail/xmodule-mutation.rkt
Normal 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)
|
Loading…
Reference in New Issue
Block a user