@@ -305,19 +305,19 @@ promote_type(T, S, U, V...) = (@inline; afoldl(promote_type, promote_type(T, S,
305
305
function promote_type (:: Type{T} , :: Type{S} ) where {T,S}
306
306
@_terminates_locally_meta
307
307
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
309
309
is_bottom (:: Type{Typ} ) where {Typ} = Typ <: Bottom
310
310
left = T
311
311
right = S
312
312
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)
314
314
break
315
315
end
316
316
# Try `promote_rule` in both orders.
317
317
a = normalized_type (promote_rule (left, right))
318
318
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)
321
321
if loop_is_detected_1 || loop_is_detected_2
322
322
let s = LazyString (" `promote_type(" , T, " , " , S, " )` failed, there are conflicting `promote_rule` definitions for types " , a, " , " , b)
323
323
throw (ArgumentError (s))
@@ -331,7 +331,7 @@ function promote_type(::Type{T}, ::Type{S}) where {T,S}
331
331
left = a
332
332
right = b
333
333
end
334
- if types_are_identical (left, right) || is_bottom (left)
334
+ if types_are_equal (left, right) || is_bottom (left)
335
335
right
336
336
elseif is_bottom (right)
337
337
left
0 commit comments