Skip to content

Commit 1ad01d9

Browse files
committed
fix method signature to respect caller's choice, even if it's not a method
1 parent 3196cf1 commit 1ad01d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/inference.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,7 @@ end
20872087

20882088
const deprecated_sym = Symbol("deprecated.jl")
20892089

2090-
function method_for_inference_heuristics(cinfo, default::Method)::Method
2090+
function method_for_inference_heuristics(cinfo, default)
20912091
if isa(cinfo, CodeInfo)
20922092
# appropriate format for `sig` is svec(ftype, argtypes, world)
20932093
sig = cinfo.signature_for_inference_heuristics
@@ -2104,7 +2104,7 @@ function method_for_inference_heuristics(cinfo, default::Method)::Method
21042104
return default
21052105
end
21062106

2107-
function method_for_inference_heuristics(method::Method, @nospecialize(sig), sparams, world)::Method
2107+
function method_for_inference_heuristics(method::Method, @nospecialize(sig), sparams, world)
21082108
if isdefined(method, :generator) && method.generator.expand_early
21092109
method_instance = code_for_method(method, sig, sparams, world, false)
21102110
if isa(method_instance, MethodInstance)

0 commit comments

Comments
 (0)