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 22, 2017
1 parent 0b0241f commit a1fcb60
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 @@ -2087,7 +2087,7 @@ end

const deprecated_sym = Symbol("deprecated.jl")

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 @@ -2104,7 +2104,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 a1fcb60

Please sign in to comment.