Skip to content

Commit d87fe81

Browse files
committed
allow unlimited inference through the generic (::Type)(x) constructor -> convert call
1 parent ce1d03c commit d87fe81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/inference.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ function abstract_call_method(method::Method, f::ANY, sig::ANY, sparams::SimpleV
15371537
sigtuple = unwrap_unionall(sig)::DataType
15381538

15391539
tm = _topmod(sv)
1540-
if !istopfunction(tm, f, :promote_typeof) && !istopfunction(tm, f, :getindex)
1540+
if !istopfunction(tm, f, :promote_typeof) && !istopfunction(tm, f, :getindex) && !(method.sig == Tuple{Type, Any})
15411541
# limit argument type tuple growth
15421542
msig = unwrap_unionall(method.sig)
15431543
lsig = length(msig.parameters)

0 commit comments

Comments
 (0)