Skip to content

Commit 2ace34b

Browse files
committed
rename function
1 parent 69e5d32 commit 2ace34b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

base/promotion.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,19 @@ promote_type(T, S, U, V...) = (@inline; afoldl(promote_type, promote_type(T, S,
305305
function promote_type(::Type{T}, ::Type{S}) where {T,S}
306306
@_terminates_locally_meta
307307
normalized_type(::Type{Typ}) where {Typ} = Typ
308-
types_are_identical(::Type{A}, ::Type{B}) where {A,B} = A == B
308+
types_are_equal(::Type{A}, ::Type{B}) where {A,B} = A == B
309309
is_bottom(::Type{Typ}) where {Typ} = Typ <: Bottom
310310
left = T
311311
right = S
312312
for _ 1:1000
313-
if types_are_identical(left, right) || is_bottom(left) || is_bottom(right)
313+
if types_are_equal(left, right) || is_bottom(left) || is_bottom(right)
314314
break
315315
end
316316
# Try `promote_rule` in both orders.
317317
a = normalized_type(promote_rule(left, right))
318318
b = normalized_type(promote_rule(right, left))
319-
loop_is_detected_1 = types_are_identical(left, a) && types_are_identical(right, b)
320-
loop_is_detected_2 = types_are_identical(left, b) && types_are_identical(right, a)
319+
loop_is_detected_1 = types_are_equal(left, a) && types_are_equal(right, b)
320+
loop_is_detected_2 = types_are_equal(left, b) && types_are_equal(right, a)
321321
if loop_is_detected_1 || loop_is_detected_2
322322
let s = LazyString("`promote_type(", T, ", ", S, ")` failed, there are conflicting `promote_rule` definitions for types ", a, ", ", b)
323323
throw(ArgumentError(s))
@@ -331,7 +331,7 @@ function promote_type(::Type{T}, ::Type{S}) where {T,S}
331331
left = a
332332
right = b
333333
end
334-
if types_are_identical(left, right) || is_bottom(left)
334+
if types_are_equal(left, right) || is_bottom(left)
335335
right
336336
elseif is_bottom(right)
337337
left

0 commit comments

Comments
 (0)