diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index 23e82d90..14c038a5 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -43,7 +43,7 @@ (ret ty (make-FilterSet (-not-filter (-val #f) id) (-filter (-val #f) id)) - (make-Path null id)))) + (-id-path id)))) ;; typecheck an expression, but throw away the effect ;; tc-expr/t : Expr -> Type diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/base-abbrev.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/base-abbrev.rkt index bbd625d3..433f1e04 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/base-abbrev.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/types/base-abbrev.rkt @@ -119,7 +119,9 @@ (define/decl -no-obj (make-NoObject)) (define/decl -empty-obj (make-Empty)) (define (-id-path id) - (make-Path null id)) + (if (is-var-mutated? id) + -empty-obj + (make-Path null id))) (define (-arg-path arg [depth 0]) (make-Path null (list depth arg))) (define (-acc-path path-elems o) @@ -140,9 +142,9 @@ (cond [(Object? i) i] [(integer? i) (make-Path null (list 0 i))] - [else (make-Path null i)])) + [(list? i) (make-Path null i)] + [else (-id-path i)])) (cond - [(and (identifier? i) (is-var-mutated? i)) -top] [(Empty? o) -top] [(equal? Univ t) -top] [(equal? -Bottom t) -bot] @@ -158,9 +160,9 @@ (cond [(Object? i) i] [(integer? i) (make-Path null (list 0 i))] - [else (make-Path null i)])) + [(list? i) (make-Path null i)] + [else (-id-path i)])) (cond - [(and (identifier? i) (is-var-mutated? i)) -top] [(Empty? o) -top] [(equal? -Bottom t) -top] [(equal? Univ t) -bot]