Skip to content

Commit 35c9b52

Browse files
authored
use the Base version of func_for_method_checked
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.
1 parent c7bbd98 commit 35c9b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function my_code_typed(@nospecialize(f), @nospecialize(types=Tuple))
6060
world = ccall(:jl_get_world_counter, UInt, ())
6161
params = Core.Compiler.Params(world)
6262
for x in Core.Compiler._methods(f, types, -1, world)
63-
meth = Core.Compiler.func_for_method_checked(x[3], types)
63+
meth = Base.func_for_method_checked(x[3], types)
6464
(code, slottypes) = my_typeinf_code(meth, x[1], x[2], params)
6565
code === nothing && error("inference not successful")
6666
push!(asts, code => slottypes)
@@ -120,4 +120,4 @@ function hasreturnvalue(expr)
120120
(val == :nothing || val == nothing) && return expr
121121
@warn "@resumable function contains return statement with value!"
122122
expr
123-
end
123+
end

0 commit comments

Comments
 (0)