Skip to content

Commit

Permalink
update to latest type inference
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed May 30, 2020
1 parent 7797d51 commit 4650266
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ function rt_inf(@nospecialize(f), m, @nospecialize(tt::Type))

# sometimes method signature can tell the return type by itself
sparams = Core.svec(sparam_syms(m)...)
inf = Core.Compiler.typeinf_type(m, m.sig, sparams, Core.Compiler.Params(world))
inf = @static if isdefined(Core.Compiler, :NativeInterpreter)
Core.Compiler.typeinf_type(Core.Compiler.NativeInterpreter(), m, m.sig, sparams)
else
Core.Compiler.typeinf_type(m, m.sig, sparams, Core.Compiler.Params(world))
end
inf (nothing, Any, Union{}) && return shortstr(inf)
catch err
# @error err
Expand Down

0 comments on commit 4650266

Please sign in to comment.