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)