From d87fe81bd77510b035f8c9ac561b22fcc798767a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 19 May 2017 02:14:52 -0400 Subject: [PATCH] allow unlimited inference through the generic (::Type)(x) constructor -> convert call --- base/inference.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/inference.jl b/base/inference.jl index 3008fef41e03a..56e00e42f25b5 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -1537,7 +1537,7 @@ function abstract_call_method(method::Method, f::ANY, sig::ANY, sparams::SimpleV sigtuple = unwrap_unionall(sig)::DataType tm = _topmod(sv) - if !istopfunction(tm, f, :promote_typeof) && !istopfunction(tm, f, :getindex) + if !istopfunction(tm, f, :promote_typeof) && !istopfunction(tm, f, :getindex) && !(method.sig == Tuple{Type, Any}) # limit argument type tuple growth msig = unwrap_unionall(method.sig) lsig = length(msig.parameters)