From 395db983d89e626fb2470402abb40498f9bb7de8 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Mon, 24 Feb 2025 23:04:17 +0100 Subject: [PATCH] fix --- base/promotion.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/promotion.jl b/base/promotion.jl index c732a59683bce..59d5736bfed19 100644 --- a/base/promotion.jl +++ b/base/promotion.jl @@ -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