Skip to content

Commit

Permalink
fix method signature to respect caller's choice, even if it's not a m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
jrevels committed Dec 20, 2017
1 parent 20c2f20 commit faf68c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ function abstract_call_method_with_const_args(@nospecialize(f), argtypes::Vector
return result
end

function method_for_inference_heuristics(cinfo, default::Method)::Method
function method_for_inference_heuristics(cinfo, default)
if isa(cinfo, CodeInfo)
# appropriate format for `sig` is svec(ftype, argtypes, world)
sig = cinfo.signature_for_inference_heuristics
Expand All @@ -2102,7 +2102,7 @@ function method_for_inference_heuristics(cinfo, default::Method)::Method
return default
end

function method_for_inference_heuristics(method::Method, @nospecialize(sig), sparams, world)::Method
function method_for_inference_heuristics(method::Method, @nospecialize(sig), sparams, world)
if isdefined(method, :generator) && method.generator.expand_early
method_instance = code_for_method(method, sig, sparams, world, false)
if isa(method_instance, MethodInstance)
Expand Down

0 comments on commit faf68c0

Please sign in to comment.