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 29, 2017
1 parent 62e3059 commit fe180b1
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 @@ -1539,7 +1539,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 fe180b1

Please sign in to comment.