Skip to content

Commit

Permalink
allow unlimited inference through the generic (::Type)(x) constructor…
Browse files Browse the repository at this point in the history
… -> convert call
  • Loading branch information
vtjnash committed May 31, 2017
1 parent fb4a452 commit d58fe10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,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)
Expand Down

0 comments on commit d58fe10

Please sign in to comment.