@@ -105,21 +105,18 @@ _left_intersect_type(::Type{Val{:closed}}, ::Type{Val{L2}}, a1, a2) where L2 = a
105105_right_intersect_type (:: Type{Val{:open}} , :: Type{Val{R2}} , b1, b2) where R2 = b1 > b2 ? (b2,R2) : (b1,:open )
106106_right_intersect_type (:: Type{Val{:closed}} , :: Type{Val{R2}} , b1, b2) where R2 = b1 ≥ b2 ? (b2,R2) : (b1,:closed )
107107
108- function intersect (d1:: TypedEndpointsInterval{L1,R1,T } , d2:: TypedEndpointsInterval{L2,R2,T } ) where {L1,R1,L2,R2,T }
108+ function intersect (d1:: TypedEndpointsInterval{L1,R1} , d2:: TypedEndpointsInterval{L2,R2} ) where {L1,R1,L2,R2}
109109 a1, b1 = endpoints (d1); a2, b2 = endpoints (d2)
110110 a,L = _left_intersect_type (Val{L1}, Val{L2}, a1, a2)
111111 b,R = _right_intersect_type (Val{R1}, Val{R2}, b1, b2)
112112 Interval {L,R} (a,b)
113113end
114114
115- function intersect (d1:: TypedEndpointsInterval{L,R,T } , d2:: TypedEndpointsInterval{L,R,T } ) where {L,R,T }
115+ function intersect (d1:: TypedEndpointsInterval{L,R} , d2:: TypedEndpointsInterval{L,R} ) where {L,R}
116116 a1, b1 = endpoints (d1); a2, b2 = endpoints (d2)
117117 Interval {L,R} (max (a1,a2),min (b1,b2))
118118end
119119
120- intersect (d1:: TypedEndpointsInterval{L1,R1,T} , d2:: TypedEndpointsInterval{L2,R2,V} ) where {L1,R1,L2,R2,T,V} =
121- intersect (promote (d1, d2)... )
122-
123120intersect (d1:: AbstractInterval , d2:: AbstractInterval ) = intersect (Interval (d1), Interval (d2))
124121
125122
0 commit comments