From 207a12fa2399a70a7cf8bc76b89d9c7c7cb01ded Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 3 Nov 2015 14:35:32 -0600 Subject: [PATCH] Fix the fix to compound pair optimimzations. Previous version could drop code on the ground in some cases. --- typed-racket-lib/typed-racket/optimizer/pair.rkt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typed-racket-lib/typed-racket/optimizer/pair.rkt b/typed-racket-lib/typed-racket/optimizer/pair.rkt index 54f2b657..09fb59bd 100644 --- a/typed-racket-lib/typed-racket/optimizer/pair.rkt +++ b/typed-racket-lib/typed-racket/optimizer/pair.rkt @@ -137,9 +137,8 @@ [(tc-result1: t) t])] [res #'e.arg]) ([accessor (in-list (reverse (syntax->list #'e.alt)))]) - #:break (not t) (cond - [(subtype t (-pair Univ Univ)) ; safe to optimize this one layer + [(and t (subtype t (-pair Univ Univ))) ; safe to optimize this one layer (syntax-parse accessor [op:pair-op (log-pair-opt)