We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed908ee commit 96c351eCopy full SHA for 96c351e
src/validation.jl
@@ -32,11 +32,9 @@ function check_method(@nospecialize(job::CompilerJob))
32
if job.config.kernel
33
rt = typeinf_type(job.source; interp=get_interpreter(job))
34
35
- if rt != Nothing
+ if rt != Nothing && rt != Union{}
36
throw(KernelError(job, "kernel returns a value of type `$rt`",
37
- """Make sure your kernel function ends in `return`, `return nothing` or `nothing`.
38
- If the returned value is of type `Union{}`, your Julia code probably throws an exception.
39
- Inspect the code with `@device_code_warntype` for more details."""))
+ """Make sure your kernel function ends in `return`, `return nothing` or `nothing`."""))
40
end
41
42
0 commit comments