File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,18 @@ function method_matches(@nospecialize(tt::Type{<:Tuple}); world::Integer)
1414end
1515
1616function typeinf_type (mi:: MethodInstance ; interp:: CC.AbstractInterpreter )
17- ty = Core. Compiler. typeinf_type (interp, mi. def, mi. specTypes, mi. sparam_vals)
18- return something (ty, Any)
17+ @static if VERSION < v " 1.11.0"
18+ code = Core. Compiler. get (Core. Compiler. code_cache (interp), mi, nothing )
19+ if code isa Core. Compiler. CodeInstance
20+ return code. rettype
21+ end
22+ result = Core. Compiler. InferenceResult (mi, Core. Compiler. typeinf_lattice (interp))
23+ Core. Compiler. typeinf (interp, result, :global )
24+ Core. Compiler. is_inferred (result) || return Any
25+ Core. Compiler. widenconst (Core. Compiler. ignorelimited (result. result))
26+ else
27+ something (Core. Compiler. typeinf_type (interp, mi), Any)
28+ end
1929end
2030
2131function check_method (@nospecialize (job:: CompilerJob ))
You can’t perform that action at this time.
0 commit comments