Skip to content

Commit fe180b1

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

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
@@ -1539,7 +1539,7 @@ function abstract_call_method(method::Method, f::ANY, sig::ANY, sparams::SimpleV
15391539
sigtuple = unwrap_unionall(sig)::DataType
15401540

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

0 commit comments

Comments
 (0)