From 946a8dd48f6fd84313ae8cdecacb02c1d9ff9c73 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 11 Jun 2010 11:53:55 -0400 Subject: [PATCH] new bug with mutation original commit: b649575afc2611ca0a3bec1f6f3d70e45ec011c1 --- .../typed-scheme/xfail/xmodule-mutation.rkt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 collects/tests/typed-scheme/xfail/xmodule-mutation.rkt diff --git a/collects/tests/typed-scheme/xfail/xmodule-mutation.rkt b/collects/tests/typed-scheme/xfail/xmodule-mutation.rkt new file mode 100644 index 00000000..fb8dfc4f --- /dev/null +++ b/collects/tests/typed-scheme/xfail/xmodule-mutation.rkt @@ -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)