Two types definitely overlap if they are equal.
Fixes infinite loop in Whalesong compilation.
This commit is contained in:
parent
2570fae481
commit
c55cceed8c
|
@ -11,6 +11,7 @@
|
||||||
(define (overlap t1 t2)
|
(define (overlap t1 t2)
|
||||||
(let ([ks (Type-key t1)] [kt (Type-key t2)])
|
(let ([ks (Type-key t1)] [kt (Type-key t2)])
|
||||||
(cond
|
(cond
|
||||||
|
[(type-equal? t1 t2) #t]
|
||||||
[(and (symbol? ks) (symbol? kt) (not (eq? ks kt))) #f]
|
[(and (symbol? ks) (symbol? kt) (not (eq? ks kt))) #f]
|
||||||
[(and (symbol? ks) (pair? kt) (not (memq ks kt))) #f]
|
[(and (symbol? ks) (pair? kt) (not (memq ks kt))) #f]
|
||||||
[(and (symbol? kt) (pair? ks) (not (memq kt ks))) #f]
|
[(and (symbol? kt) (pair? ks) (not (memq kt ks))) #f]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user