Skip to content

Commit

Permalink
update with JuliaLang/julia#44515
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 15, 2022
1 parent 893a662 commit d14878a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ function check_method(@nospecialize(job::CompilerJob))
cache = ci_cache(job)
mt = method_table(job)
interp = GPUInterpreter(cache, mt, job.source.world)
rt = Base.return_types(job.source.f, job.source.tt, interp)[1]
@static if VERSION v"1.9.0-DEV.190"
# https://github.com/JuliaLang/julia/pull/44515
rt = Base.return_types(job.source.f, job.source.tt; interp)[1]
else
rt = Base.return_types(job.source.f, job.source.tt, interp)[1]
end
if rt != Nothing
throw(KernelError(job, "kernel returns a value of type `$rt`",
"""Make sure your kernel function ends in `return`, `return nothing` or `nothing`.
Expand Down

0 comments on commit d14878a

Please sign in to comment.