Skip to content

Commit

Permalink
use the Base version of func_for_method_checked
Browse files Browse the repository at this point in the history
This package was noted to fail on the 1.2 branch of Julia. The usage of `func_for_method_checked` was changed in JuliaLang/julia#31025 to also take an `sparams` argument. The old usage was deprecated but the function `depwarn` is not available in `Core.Compiler`. Using the `Base` version of this function will show the deprecation message instead of hard errorring.
  • Loading branch information
KristofferC committed May 16, 2019
1 parent c7bbd98 commit 35c9b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function my_code_typed(@nospecialize(f), @nospecialize(types=Tuple))
world = ccall(:jl_get_world_counter, UInt, ())
params = Core.Compiler.Params(world)
for x in Core.Compiler._methods(f, types, -1, world)
meth = Core.Compiler.func_for_method_checked(x[3], types)
meth = Base.func_for_method_checked(x[3], types)
(code, slottypes) = my_typeinf_code(meth, x[1], x[2], params)
code === nothing && error("inference not successful")
push!(asts, code => slottypes)
Expand Down Expand Up @@ -120,4 +120,4 @@ function hasreturnvalue(expr)
(val == :nothing || val == nothing) && return expr
@warn "@resumable function contains return statement with value!"
expr
end
end

0 comments on commit 35c9b52

Please sign in to comment.