Merge pull request #5 from andmkent/master

fixed mutation let-aliasing bug
This commit is contained in:
Andrew Kent 2015-01-05 09:15:57 -05:00
commit dc2ce38aef
2 changed files with 11 additions and 1 deletions

View File

@ -52,7 +52,7 @@
(match e-r
[(list (tc-result: e-ts (FilterSet: fs+ fs-) os) ...)
(values e-ts
os
(map (λ (o n) (if (is-var-mutated? n) -empty-obj o)) os names)
(apply append
(for/list ([n (in-list names)]
[t (in-list e-ts)]

View File

@ -3392,6 +3392,16 @@
(void))
-Void]
[tc-err (let ()
(: foo (-> Any Number))
(define foo
(λ (x) (let ([x* x])
(begin
(set! x* "sneaky string")
(if (number? x)
x*
42))))))]
;; tests looking up path-types into unions
[tc-e (let ()
(: foo ((U (Pairof Number Number) (Pairof Number String)) -> Number))