Skip to content

Commit 6903ecd

Browse files
committed
even less method static parameters
1 parent 8aa763d commit 6903ecd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/promotion.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ const _promote_type_binary_detected_infinite_recursion_exception = let
331331
s = "`promote_type`: detected unbounded recursion caused by faulty `promote_rule` logic"
332332
ArgumentError(s)
333333
end
334-
function _promote_type_binary(::Type{T}, ::Type{S}, recursion_depth_limit::Tuple{Vararg{Nothing}}) where {T,S}
334+
function _promote_type_binary(T::Type, S::Type, recursion_depth_limit::Tuple{Vararg{Nothing}})
335335
function err_giving_up()
336336
@noinline
337337
throw(_promote_type_binary_recursion_depth_limit_exception)
@@ -341,7 +341,7 @@ function _promote_type_binary(::Type{T}, ::Type{S}, recursion_depth_limit::Tuple
341341
throw(_promote_type_binary_detected_infinite_recursion_exception)
342342
end
343343
type_is_bottom(X::Type) = X <: Bottom
344-
detect_loop(::Type{A}, ::Type{B}) where {A, B} = _types_are_equal(T, A) && _types_are_equal(S, B)
344+
detect_loop(T::Type, S::Type, A::Type, B::Type) = _types_are_equal(T, A) && _types_are_equal(S, B)
345345
if type_is_bottom(T)
346346
return S
347347
end
@@ -356,7 +356,7 @@ function _promote_type_binary(::Type{T}, ::Type{S}, recursion_depth_limit::Tuple
356356
if type_is_bottom(st) && type_is_bottom(ts)
357357
return typejoin(T, S)
358358
end
359-
if detect_loop(ts, st) || detect_loop(st, ts)
359+
if detect_loop(T, S, ts, st) || detect_loop(T, S, st, ts)
360360
# This is not strictly necessary, as we already limit the recursion depth, but
361361
# makes for nicer UX.
362362
err_detected_infinite_recursion()

0 commit comments

Comments
 (0)