You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update type promotion
* update tests for type promotion error
* update tests around missing
* add tests for Unitful interval
* update detect_ambiguities not to count ambiguities in Unitful
* add tests for 1u"m" .. 2u"s"
Copy file name to clipboardExpand all lines: src/interval.jl
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,7 @@ mathematical notation, the constructed range is `(left, right)`.
27
27
const OpenInterval{T} = Interval{:open,:open,T}
28
28
29
29
Interval{L,R,T}(i::AbstractInterval) where {L,R,T} =Interval{L,R,T}(endpoints(i)...)
30
-
functionInterval{L,R}(left, right) where {L,R}
31
-
#TODO: Replace the retrun value with `Interval{L,R}(promote(left,right)...)`. (#93)
32
-
T =promote_type(typeof(left), typeof(right))
33
-
if!isconcretetype(T)
34
-
Base.depwarn("`Promotion to a concrete type failed and will error in the next release; consider constructing this interval as `Interval{L,R,$(typejoin(typeof(left),typeof(right)))}(left, right)`.", :Interval)
35
-
end
36
-
Interval{L,R,T}(left,right)
37
-
end
30
+
Interval{L,R}(left, right) where {L,R} =Interval{L,R}(promote(left,right)...)
38
31
Interval{L,R}(left::T, right::T) where {L,R,T} =Interval{L,R,T}(left, right)
0 commit comments