From a1fcb6005474c78aeb1bc6afbd28aed0f7352c0a Mon Sep 17 00:00:00 2001 From: Jarrett Revels Date: Wed, 20 Dec 2017 08:47:38 -0500 Subject: [PATCH] fix method signature to respect caller's choice, even if it's not a method --- base/inference.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/inference.jl b/base/inference.jl index 5e745760d4193..1c79413e23660 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -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 @@ -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)