diff --git a/collects/tests/typed-racket/unit-tests/remove-intersect-tests.rkt b/collects/tests/typed-racket/unit-tests/remove-intersect-tests.rkt index f8f0711b9a..db09146712 100644 --- a/collects/tests/typed-racket/unit-tests/remove-intersect-tests.rkt +++ b/collects/tests/typed-racket/unit-tests/remove-intersect-tests.rkt @@ -33,6 +33,7 @@ [(Un -Number -String -Symbol -Boolean) -Number -Number] [(-lst -Number) (-pair Univ Univ) (-pair -Number (-lst -Number))] + [(-lst -Number) (-poly (a) (-lst a)) (-lst -Number)] ;; FIXME #; [-Listof -Sexp (-lst (Un B N -String Sym))] diff --git a/collects/typed-racket/infer/restrict.rkt b/collects/typed-racket/infer/restrict.rkt index 25c005c8c0..6e6157f321 100644 --- a/collects/typed-racket/infer/restrict.rkt +++ b/collects/typed-racket/infer/restrict.rkt @@ -24,8 +24,7 @@ [(subtype t1 t2) t1] ;; already a subtype [(match t2 [(Poly: vars t) - (let ([subst (infer vars null (list t1) (list t) t1)]) - (and subst (restrict* t1 (subst-all subst t1) f)))] + (and (infer vars null (list t1) (list t) #f) t1)] [_ #f])] [(Union? t1) (union-map (lambda (e) (restrict* e t2 f)) t1)] [(Union? t2) (union-map (lambda (e) (restrict* t1 e f)) t2)]