From 6504b0856e435b35d4e9efaba848ef7a9617c2b3 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 16 Sep 2011 17:19:47 -0400 Subject: [PATCH] Two types definitely overlap if they are equal. Fixes infinite loop in Whalesong compilation. original commit: c55cceed8c74ac7d8115fab6656e21949a1a33b8 --- collects/typed-racket/types/remove-intersect.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/typed-racket/types/remove-intersect.rkt b/collects/typed-racket/types/remove-intersect.rkt index 3cecfda9..f5f7c4fa 100644 --- a/collects/typed-racket/types/remove-intersect.rkt +++ b/collects/typed-racket/types/remove-intersect.rkt @@ -1,8 +1,8 @@ #lang scheme/base (require "../utils/utils.rkt" - (rep type-rep rep-utils) - (types union subtype resolve convenience utils) + (rep type-rep rep-utils) + (types union subtype resolve convenience utils) racket/match mzlib/trace) (provide (rename-out [*remove remove]) overlap) @@ -11,6 +11,7 @@ (define (overlap t1 t2) (let ([ks (Type-key t1)] [kt (Type-key t2)]) (cond + [(type-equal? t1 t2) #t] [(and (symbol? ks) (symbol? kt) (not (eq? ks kt))) #f] [(and (symbol? ks) (pair? kt) (not (memq ks kt))) #f] [(and (symbol? kt) (pair? ks) (not (memq kt ks))) #f]