Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko committed Feb 24, 2025
1 parent 4b7bb02 commit 395db98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/promotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ function _promote_type_binary(::Type{Bottom}, ::Type{T}, ::Tuple{Nothing,Vararg{
T
end
function _promote_type_binary(::Type{T}, ::Type{S}, recursion_depth_limit::Tuple{Nothing,Vararg{Nothing}}) where {T,S}
l = tail(recursion_depth_limit)
# Try promote_rule in both orders.
promote_result(T, S, promote_rule(T,S), promote_rule(S,T), recursion_depth_limit)
promote_result(T, S, promote_rule(T,S), promote_rule(S,T), l)
end

const _promote_type_binary_recursion_depth_limit = ((nothing for _ in 1:28)...,) # recursion depth limit to prevent stack overflow
Expand Down

0 comments on commit 395db98

Please sign in to comment.