Merge pull request #5 from andmkent/master
fixed mutation let-aliasing bug
This commit is contained in:
commit
dc2ce38aef
|
@ -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)]
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user